@@ -60,6 +60,29 @@ different storage mechanism with a different API for such files. The entry point
6060
6161## Concepts ## {#concepts}
6262
63+ ### File System ### {#concept-file-system}
64+
65+ A <dfn export>file system root</dfn> is an opaque [=string=] whose value is
66+ [=implementation-defined=] .
67+
68+ A <dfn export>file system path</dfn> is a [=/list=] of one or more [=strings=] .
69+ This may be a virtual path that is mapped to real location on disk or in memory,
70+ may correspond directly to a path on the local file system, or may not
71+ correspond to any file on disk at all. The actual physical location of the
72+ corresponding [=/file system entry=] is [=implementation-defined=] .
73+
74+ <p class=example id=example-path> Let |path| be the [=/list=]
75+ « "`data`", "`drafts`", "`example.txt`" ».
76+ There is no expectation that a file named `example.txt` exists anywhere on disk.
77+
78+ A [=/file system path=] |a| is <dfn for="file system path">the same path as</dfn>
79+ a [=/file system path=] |b| if
80+ |a|'s [=list/size=] is the same as |b|' s [=list/size=] and
81+ [=list/for each=] |index| of |a|'s [=list/indices=]
82+ |a|.\[[|index|]] is |b|.\[[|index|]] .
83+
84+ ### File System Entry ### {#concept-file-system-entry}
85+
6386A <dfn export id="entry">file system entry</dfn> is either a [=file entry=] or a [=directory entry=] .
6487
6588Each [=/file system entry=] has an associated
@@ -200,6 +223,38 @@ A [=/file system entry=] |a| is <dfn for="file system entry">the same entry as</
200223a [=/file system entry=] |b| if |a| is equal to |b|, or
201224if |a| and |b| are backed by the same file or directory on the local file system.
202225
226+ ### File System Locator ### {#concept-file-system-locator}
227+
228+ A <dfn export>file system locator</dfn> represents a potential location of a
229+ [=/file system entry=] . A [=/file system locator=] is either a [=file locator=]
230+ or a [=directory locator=] .
231+
232+ Each [=/file system locator=] has an associated <dfn export for="file system locator" id=locator-path>path</dfn> (a [=/file system path=] ),
233+ a <dfn export for="file system locator" id=locator-kind>kind</dfn> (a {{FileSystemHandleKind}} ), and
234+ a <dfn export for="file system locator" id=locator-root>root</dfn> (a [=file system root=] ).
235+
236+ Issue(109): Consider giving each locator a [=storage bucket=] .
237+
238+ A <dfn export>file locator</dfn> is a [=/file system locator=] whose
239+ [=file system locator/kind=] is "{{FileSystemHandleKind/file}} ".
240+ A <dfn export>directory locator</dfn> is a [=/file system locator=] whose
241+ [=file system locator/kind=] is "{{FileSystemHandleKind/directory}} ".
242+
243+ <p class=example id=example-locator> For a [=/file system locator=] |locator|
244+ whichs [=locate an entry|locates to=] a [=file entry=] |entry| that conceptually
245+ exists at the path `data/drafts/example.txt` relative to the root directory of
246+ a [=/bucket file system=] ,
247+ |locator|'s [=file system locator/kind=] has to be "{{FileSystemHandleKind/file}} ",
248+ |locator|'s [=file system locator/path=] has to be « "`data`", "`drafts`", "`example.txt`" », and
249+ |locator|'s [=file system locator/root=] might include relevant identifying
250+ information such as the [=storage bucket=] and the disk drive.
251+
252+ A [=/file system locator=] |a| is <dfn for="file system locator">the same locator as</dfn>
253+ a [=/file system locator=] |b| if
254+ |a|'s [=file system locator/kind=] is |b|' s [=file system locator/kind=] ,
255+ |a|'s [=file system locator/root=] is |b|' s [=file system locator/root=] , and
256+ |a|'s [=file system locator/path=] is [=the same path as=] |b|' s [=file system locator/path=] .
257+
203258<div algorithm>
204259
205260To <dfn for="file system locator" id=locator-resolve>resolve</dfn> a
@@ -234,39 +289,6 @@ To <dfn for="file system locator" id=locator-resolve>resolve</dfn> a
234289
235290</div>
236291
237- A <dfn export>file system locator</dfn> represents a potential location of a
238- [=/file system entry=] . A [=/file system locator=] is either a [=file locator=]
239- or a [=directory locator=] .
240-
241- Each [=/file system locator=] has an associated <dfn export for="file system locator" id=locator-path>path</dfn> (a [=/file system path=] ),
242- a <dfn export for="file system locator" id=locator-kind>kind</dfn> (a {{FileSystemHandleKind}} ), and
243- a <dfn export for="file system locator" id=locator-root>root</dfn> (a [=file system root=] ).
244-
245- Issue(109): Consider giving each locator a [=storage bucket=] .
246-
247- A <dfn export>file locator</dfn> is a [=/file system locator=] whose
248- [=file system locator/kind=] is "{{FileSystemHandleKind/file}} ".
249- A <dfn export>directory locator</dfn> is a [=/file system locator=] whose
250- [=file system locator/kind=] is "{{FileSystemHandleKind/directory}} ".
251-
252- A <dfn export>file system root</dfn> is an opaque [=string=] whose value is
253- [=implementation-defined=] .
254-
255- <p class=example id=example-locator> For a [=/file system locator=] |locator|
256- whichs [=locate an entry|locates to=] a [=file entry=] |entry| that conceptually
257- exists at the path `data/drafts/example.txt` relative to the root directory of
258- a [=/bucket file system=] ,
259- |locator|'s [=file system locator/kind=] has to be "{{FileSystemHandleKind/file}} ",
260- |locator|'s [=file system locator/path=] has to be « "`data`", "`drafts`", "`example.txt`" », and
261- |locator|'s [=file system locator/root=] might include relevant identifying
262- information such as the [=storage bucket=] and the disk drive.
263-
264- A [=/file system locator=] |a| is <dfn for="file system locator">the same locator as</dfn>
265- a [=/file system locator=] |b| if
266- |a|'s [=file system locator/kind=] is |b|' s [=file system locator/kind=] ,
267- |a|'s [=file system locator/root=] is |b|' s [=file system locator/root=] , and
268- |a|'s [=file system locator/path=] is [=the same path as=] |b|' s [=file system locator/path=] .
269-
270292<div algorithm>
271293The <dfn export data-lt="locating an entry">locate an entry</dfn> algorithm given a
272294[=/file system locator=] |locator| runs an [=implementation-defined=] series of steps adhering to
@@ -297,22 +319,6 @@ constraints:
297319
298320</div>
299321
300- A <dfn export>file system path</dfn> is a [=/list=] of one or more [=strings=] .
301- This may be a virtual path that is mapped to real location on disk or in memory,
302- may correspond directly to a path on the local file system, or may not
303- correspond to any file on disk at all. The actual physical location of the
304- corresponding [=/file system entry=] is [=implementation-defined=] .
305-
306- <p class=example id=example-path> Let |path| be the [=/list=]
307- « "`data`", "`drafts`", "`example.txt`" ».
308- There is no expectation that a file named `example.txt` exists anywhere on disk.
309-
310- A [=/file system path=] |a| is <dfn for="file system path">the same path as</dfn>
311- a [=/file system path=] |b| if
312- |a|'s [=list/size=] is the same as |b|' s [=list/size=] and
313- [=list/for each=] |index| of |a|'s [=list/indices=]
314- |a|.\[[|index|]] is |b|.\[[|index|]] .
315-
316322<p class=warning> The contents of a [=/file system locator=] , including its
317323[=file system locator/path=] , are not expected to be shared in their entirety
318324with the website process. The [=/file system path=] might contain components
0 commit comments