From 61181a1c4d505e47c6fbc3d9c88f6800709a009e Mon Sep 17 00:00:00 2001 From: Nathan Memmott Date: Fri, 28 Jun 2024 15:44:37 -0700 Subject: [PATCH] Editorial: Add sections to Concepts section Gives each concept in the concepts section its own section. --- index.bs | 104 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 49 deletions(-) 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 asfile 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=]. +

To resolve a @@ -234,39 +289,6 @@ To resolve a
-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}}". - -A file system root is an opaque [=string=] whose value is -[=implementation-defined=]. - -

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=]. -

The locate an entry algorithm given a [=/file system locator=] |locator| runs an [=implementation-defined=] series of steps adhering to @@ -297,22 +319,6 @@ constraints:
-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|]]. -

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