@@ -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,33 @@ $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
- type : string?
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 .
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 `/` .
100
109
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.
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`.
105
118
- name : dirname
106
119
type : string?
107
120
doc : |
@@ -121,10 +134,8 @@ $graph:
121
134
period. Leading periods on the basename are ignored; a basename of
122
135
`.cshrc` will have a nameroot of `.cshrc`.
123
136
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.
137
+ The implementation must set this field automatically based on the value
138
+ of `basename` prior to evaluating parameter references or expressions.
128
139
- name : nameext
129
140
type : string?
130
141
doc : |
@@ -133,10 +144,8 @@ $graph:
133
144
period. Leading periods on the basename are ignored; a basename of
134
145
`.cshrc` will have an empty `nameext`.
135
146
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.
147
+ The implementation must set this field automatically based on the value
148
+ of `basename` prior to evaluating parameter references or expressions.
140
149
- name : checksum
141
150
type : ["null", string]
142
151
doc : |
@@ -149,7 +158,7 @@ $graph:
149
158
type :
150
159
- " null"
151
160
- type : array
152
- items : [File, Dirent ]
161
+ items : [File, Directory ]
153
162
jsonldPredicate : " cwl:secondaryFiles"
154
163
doc : |
155
164
A list of additional files that are associated with the primary file
@@ -179,26 +188,16 @@ $graph:
179
188
File format ontologies may be provided in the "$schema" metadata at the
180
189
root of the document. If no ontologies are specified in `$schema`, the
181
190
runtime may perform exact file format matches.
182
-
183
-
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
191
+ - name : contents
192
+ type : string?
193
+ doc : |
194
+ content
195
195
196
196
- name : Directory
197
197
type : record
198
198
docParent : " #CWLType"
199
199
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.
200
+ Represents a directory to present to a command line tool.
202
201
fields :
203
202
- name : class
204
203
type :
@@ -223,7 +222,7 @@ $graph:
223
222
error.
224
223
225
224
If the `location' field is not provided, the `listing` field must be
226
- provided. The implementation must generate an internal identifier for
225
+ provided. The implementation must assign a unique identifier for
227
226
the `location` field.
228
227
229
228
If the `path` field is provided but the `location` field is not, an
@@ -247,8 +246,15 @@ $graph:
247
246
type :
248
247
- " null"
249
248
- type : array
250
- items : [File, Dirent]
251
- doc : List of files or subdirectories contained in this directory
249
+ items : [File, Directory]
250
+ doc : |
251
+ List of files or subdirectories contained in this directory. The name
252
+ of each file or subdirectory is determined by the `basename` field of
253
+ each `File` or `Directory` object. It is an error if a `File` shares a
254
+ `basename` with any other entry in `listing`. If two or more
255
+ `Directory` object share the same `basename`, this must be treated as
256
+ equivalent to a single subdirectory with the listings recursively
257
+ merged.
252
258
jsonldPredicate :
253
259
_id : " cwl:listing"
254
260
mapSubject : entryname
0 commit comments