diff --git a/index.bs b/index.bs index 881fb19..aeff0fd 100644 --- a/index.bs +++ b/index.bs @@ -60,6 +60,29 @@ different storage mechanism with a different API for such files. The entry point ## Concepts ## {#concepts} +### File System ### {#concept-file-system} + +A file system root is an opaque [=string=] whose value is +[=implementation-defined=]. + +A file system path is a [=/list=] of one or more [=strings=]. +This may be a virtual path that is mapped to real location on disk or in memory, +may correspond directly to a path on the local file system, or may not +correspond to any file on disk at all. The actual physical location of the +corresponding [=/file system entry=] is [=implementation-defined=]. + +
Let |path| be the [=/list=]
+« "`data`", "`drafts`", "`example.txt`" ».
+There is no expectation that a file named `example.txt` exists anywhere on disk.
+
+A [=/file system path=] |a| is the same path as
+a [=/file system path=] |b| if
+|a|'s [=list/size=] is the same as |b|'s [=list/size=] and
+[=list/for each=] |index| of |a|'s [=list/indices=]
+|a|.\[[|index|]] is |b|.\[[|index|]].
+
+### File System Entry ### {#concept-file-system-entry}
+
A file system entry is either a [=file entry=] or a [=directory entry=].
Each [=/file system entry=] has an associated
@@ -200,6 +223,38 @@ A [=/file system entry=] |a| is the same entry as
a [=/file system entry=] |b| if |a| is equal to |b|, or
if |a| and |b| are backed by the same file or directory on the local file system.
+### File System Locator ### {#concept-file-system-locator}
+
+A file system locator represents a potential location of a
+[=/file system entry=]. A [=/file system locator=] is either a [=file locator=]
+or a [=directory locator=].
+
+Each [=/file system locator=] has an associated path (a [=/file system path=]),
+a kind (a {{FileSystemHandleKind}}), and
+a root (a [=file system root=]).
+
+Issue(109): Consider giving each locator a [=storage bucket=].
+
+A file locator is a [=/file system locator=] whose
+[=file system locator/kind=] is "{{FileSystemHandleKind/file}}".
+A directory locator is a [=/file system locator=] whose
+[=file system locator/kind=] is "{{FileSystemHandleKind/directory}}".
+
+ For a [=/file system locator=] |locator|
+whichs [=locate an entry|locates to=] a [=file entry=] |entry| that conceptually
+exists at the path `data/drafts/example.txt` relative to the root directory of
+a [=/bucket file system=],
+|locator|'s [=file system locator/kind=] has to be "{{FileSystemHandleKind/file}}",
+|locator|'s [=file system locator/path=] has to be « "`data`", "`drafts`", "`example.txt`" », and
+|locator|'s [=file system locator/root=] might include relevant identifying
+information such as the [=storage bucket=] and the disk drive.
+
+A [=/file system locator=] |a| is the same locator as
+a [=/file system locator=] |b| if
+|a|'s [=file system locator/kind=] is |b|'s [=file system locator/kind=],
+|a|'s [=file system locator/root=] is |b|'s [=file system locator/root=], and
+|a|'s [=file system locator/path=] is [=the same path as=] |b|'s [=file system locator/path=].
+
For a [=/file system locator=] |locator|
-whichs [=locate an entry|locates to=] a [=file entry=] |entry| that conceptually
-exists at the path `data/drafts/example.txt` relative to the root directory of
-a [=/bucket file system=],
-|locator|'s [=file system locator/kind=] has to be "{{FileSystemHandleKind/file}}",
-|locator|'s [=file system locator/path=] has to be « "`data`", "`drafts`", "`example.txt`" », and
-|locator|'s [=file system locator/root=] might include relevant identifying
-information such as the [=storage bucket=] and the disk drive.
-
-A [=/file system locator=] |a| is the same locator as
-a [=/file system locator=] |b| if
-|a|'s [=file system locator/kind=] is |b|'s [=file system locator/kind=],
-|a|'s [=file system locator/root=] is |b|'s [=file system locator/root=], and
-|a|'s [=file system locator/path=] is [=the same path as=] |b|'s [=file system locator/path=].
-
Let |path| be the [=/list=]
-« "`data`", "`drafts`", "`example.txt`" ».
-There is no expectation that a file named `example.txt` exists anywhere on disk.
-
-A [=/file system path=] |a| is the same path as
-a [=/file system path=] |b| if
-|a|'s [=list/size=] is the same as |b|'s [=list/size=] and
-[=list/for each=] |index| of |a|'s [=list/indices=]
-|a|.\[[|index|]] is |b|.\[[|index|]].
-
The contents of a [=/file system locator=], including its
[=file system locator/path=], are not expected to be shared in their entirety
with the website process. The [=/file system path=] might contain components