Skip to content

Commit de7cb76

Browse files
author
Peter Amstutz
committed
Add listing to directory type
1 parent 57a5bc8 commit de7cb76

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

draft-4/Process.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ $graph:
3939
extends: "sld:PrimitiveType"
4040
symbols:
4141
- cwl:File
42+
- cwl:Directory
4243
doc:
4344
- "Extends primitive types with the concept of a file as a first class type."
4445
- "File: A File object"
46+
- "Directory: A Directory object"
4547

4648
- name: File
4749
type: record
@@ -111,12 +113,23 @@ $graph:
111113
runtime may perform exact file format matches.
112114
113115
116+
- name: Dirent
117+
type: record
118+
fields:
119+
- name: basename
120+
type: string
121+
jsonldPredicate:
122+
"_id": cwl:name
123+
- name: entry
124+
type: [File, Directory]
125+
126+
114127
- name: Directory
115128
type: record
116129
docParent: "#CWLType"
117130
doc: |
118131
Represents a directory to present to a command line tool. This could be a virtual
119-
directory, made of files assembled from a number of concrete directories.
132+
directory, made of files assembled from multiple locations.
120133
fields:
121134
- name: class
122135
type:
@@ -125,18 +138,22 @@ $graph:
125138
symbols:
126139
- cwl:Directory
127140
jsonldPredicate:
128-
"_id": "@type"
129-
"_type": "@vocab"
141+
_id: "@type"
142+
_type: "@vocab"
130143
doc: Must be `Directory` to indicate this object describes a Directory.
131144
- name: path
132145
type: string
133146
doc: The path to the directory.
134147
jsonldPredicate:
135-
"_id": "cwl:path"
136-
"_type": "@id"
137-
# - name: size
138-
# type: ["null", long]
139-
# doc: Optional directory size.
148+
_id: "cwl:path"
149+
_type: "@id"
150+
- name: listing
151+
type: Dirent[]
152+
doc: List of files or subdirectories contained in this directory
153+
jsonldPredicate:
154+
_id: "cwl:listing"
155+
mapSubject: basename
156+
mapPredicate: entry
140157

141158

142159
- name: SchemaBase

0 commit comments

Comments
 (0)