@@ -65,7 +65,7 @@ $graph:
65
65
_type : " @vocab"
66
66
doc : Must be `File` to indicate this object describes a file.
67
67
- name : location
68
- type : string
68
+ type : string?
69
69
doc : |
70
70
A URI that identifies the file resource. This may be a relative
71
71
reference, in which case it must be resolved using the base URI of the
@@ -75,6 +75,10 @@ $graph:
75
75
remote resource (due to unsupported protocol, access denied, or other
76
76
issue) it must signal an error.
77
77
78
+ If the `location' field is not provided, the `contents` field must be
79
+ provided. The implementation must assign a unique identifier for
80
+ the `location` field.
81
+
78
82
If the `path` field is provided but the `location` field is not, an
79
83
implementation may assign the value of the `path` field to `location`,
80
84
then follow the rules above.
@@ -84,24 +88,34 @@ $graph:
84
88
- name : path
85
89
type : string?
86
90
doc : |
87
- The local path where the File is made available prior to executing a
88
- CommandLineTool. This must be set by the implementation. This field
91
+ The local host path where the File is available when a CommandLineTool is
92
+ executed. This field must be set by the implementation. The final
93
+ path component must match the value of `basename`. This field
89
94
must not be used in any other context. The command line tool being
90
95
executed must be able to to access the file at `path` using the POSIX
91
96
`open(2)` syscall.
97
+
98
+ As a special case, if the `path` field is provided but the `location`
99
+ field is not, an implementation may assign the value of the `path`
100
+ field to `location`, and remove the `path` field.
92
101
jsonldPredicate :
93
102
" _id " : " cwl:path"
94
103
" _type " : " @id"
95
104
- name : basename
96
105
type : string?
97
106
doc : |
98
- The base name of the file, that is, the path component following the
99
- final slash in the path.
100
-
101
- The implementation must set this field based on the value of `path`
102
- prior to evaluating parameter references or expressions in a
103
- CommandLineTool document. This field must not be used in any other
104
- context.
107
+ The base name of the file, that is, the name of the file without any
108
+ leading directory path. The base name must not contain a slash `/`.
109
+
110
+ If not provided, the implementation must set this field based on the
111
+ `location` field by taking the final path component after parsing
112
+ `location` as an IRI. If `basename` is provided, it is not required to
113
+ match the value from `location`.
114
+
115
+ When this file is made available to a CommandLineTool, it must be named
116
+ with `basename`, i.e. the final component of the `path` field must match
117
+ `basename`.
118
+ jsonldPredicate : " cwl:basename"
105
119
- name : dirname
106
120
type : string?
107
121
doc : |
@@ -121,10 +135,8 @@ $graph:
121
135
period. Leading periods on the basename are ignored; a basename of
122
136
`.cshrc` will have a nameroot of `.cshrc`.
123
137
124
- The implementation must set this field based on the value of `path`
125
- prior to evaluating parameter references or expressions in a
126
- CommandLineTool document. This field must not be used in any other
127
- context.
138
+ The implementation must set this field automatically based on the value
139
+ of `basename` prior to evaluating parameter references or expressions.
128
140
- name : nameext
129
141
type : string?
130
142
doc : |
@@ -133,10 +145,8 @@ $graph:
133
145
period. Leading periods on the basename are ignored; a basename of
134
146
`.cshrc` will have an empty `nameext`.
135
147
136
- The implementation must set this field based on the value of `path`
137
- prior to evaluating parameter references or expressions in a
138
- CommandLineTool document. This field must not be used in any other
139
- context.
148
+ The implementation must set this field automatically based on the value
149
+ of `basename` prior to evaluating parameter references or expressions.
140
150
- name : checksum
141
151
type : ["null", string]
142
152
doc : |
@@ -149,7 +159,7 @@ $graph:
149
159
type :
150
160
- " null"
151
161
- type : array
152
- items : [File, Dirent ]
162
+ items : [File, Directory ]
153
163
jsonldPredicate : " cwl:secondaryFiles"
154
164
doc : |
155
165
A list of additional files that are associated with the primary file
@@ -179,26 +189,26 @@ $graph:
179
189
File format ontologies may be provided in the "$schema" metadata at the
180
190
root of the document. If no ontologies are specified in `$schema`, the
181
191
runtime may perform exact file format matches.
192
+ - name : contents
193
+ type : string?
194
+ doc : |
195
+ File contents literal. Maximum of 64 KiB.
182
196
197
+ If neither `location` nor `path` is provided, `contents` must be
198
+ non-null. The implementation must assign a unique identifier for the
199
+ `location` field. When the file is staged as input to CommandLineTool,
200
+ the value of `contents` must be written to a file.
201
+
202
+ If `loadContents` of `inputBinding` or `outputBinding` is true and
203
+ `location` is valid, the implementation must read up to the first 64
204
+ KiB of text from the file and place it in the "contents" field.
183
205
184
- - name : Dirent
185
- type : record
186
- fields :
187
- - name : entryname
188
- type : string
189
- jsonldPredicate :
190
- " _id " : cwl:entryname
191
- - name : entry
192
- type : [File, Directory]
193
- jsonldPredicate :
194
- " _id " : cwl:entry
195
206
196
207
- name : Directory
197
208
type : record
198
209
docParent : " #CWLType"
199
210
doc : |
200
- Represents a directory to present to a command line tool. This could be a virtual
201
- directory, made of files assembled from multiple locations.
211
+ Represents a directory to present to a command line tool.
202
212
fields :
203
213
- name : class
204
214
type :
@@ -211,7 +221,7 @@ $graph:
211
221
_type : " @vocab"
212
222
doc : Must be `Directory` to indicate this object describes a Directory.
213
223
- name : location
214
- type : string
224
+ type : string?
215
225
doc : |
216
226
A URI that identifies the directory resource. This may be a relative
217
227
reference, in which case it must be resolved using the base URI of the
@@ -222,6 +232,10 @@ $graph:
222
232
unsupported protocol, access denied, or other issue) it must signal an
223
233
error.
224
234
235
+ If the `location' field is not provided, the `listing` field must be
236
+ provided. The implementation must assign a unique identifier for
237
+ the `location` field.
238
+
225
239
If the `path` field is provided but the `location` field is not, an
226
240
implementation may assign the value of the `path` field to `location`,
227
241
then follow the rules above.
@@ -239,16 +253,36 @@ $graph:
239
253
jsonldPredicate :
240
254
_id : " cwl:path"
241
255
_type : " @id"
256
+ - name : basename
257
+ type : string?
258
+ doc : |
259
+ The base name of the directory, that is, the name of the file without any
260
+ leading directory path. The base name must not contain a slash `/`.
261
+
262
+ If not provided, the implementation must set this field based on the
263
+ `location` field by taking the final path component after parsing
264
+ `location` as an IRI. If `basename` is provided, it is not required to
265
+ match the value from `location`.
266
+
267
+ When this file is made available to a CommandLineTool, it must be named
268
+ with `basename`, i.e. the final component of the `path` field must match
269
+ `basename`.
270
+ jsonldPredicate : " cwl:basename"
242
271
- name : listing
243
272
type :
244
273
- " null"
245
274
- type : array
246
- items : [File, Dirent]
247
- doc : List of files or subdirectories contained in this directory
275
+ items : [File, Directory]
276
+ doc : |
277
+ List of files or subdirectories contained in this directory. The name
278
+ of each file or subdirectory is determined by the `basename` field of
279
+ each `File` or `Directory` object. It is an error if a `File` shares a
280
+ `basename` with any other entry in `listing`. If two or more
281
+ `Directory` object share the same `basename`, this must be treated as
282
+ equivalent to a single subdirectory with the listings recursively
283
+ merged.
248
284
jsonldPredicate :
249
285
_id : " cwl:listing"
250
- mapSubject : entryname
251
- mapPredicate : entry
252
286
253
287
- name : SchemaBase
254
288
type : record
0 commit comments