|
6 | 6 | <link href="https://www.w3.org/StyleSheets/TR/2021/cg-draft" rel="stylesheet">
|
7 | 7 | <meta content="Bikeshed version d9bd89757, updated Thu Mar 23 10:06:53 2023 -0700" name="generator">
|
8 | 8 | <link href="https://wicg.github.io/file-system-access/" rel="canonical">
|
9 |
| - <meta content="b22b8fb4eb3d31c6851a4c6382cc96eb2174535f" name="document-revision"> |
| 9 | + <meta content="f0fd3b355cdb4f874c6236f26ea524ebf0b5fe93" name="document-revision"> |
10 | 10 | <style>
|
11 | 11 | .domintro dt {
|
12 | 12 | font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
|
@@ -1011,6 +1011,9 @@ <h3 class="heading settled" data-level="2.2" id="permissions"><span class="secno
|
1011 | 1011 | </ol>
|
1012 | 1012 | </ol>
|
1013 | 1013 | </div>
|
| 1014 | + </dl> |
| 1015 | + <p class="issue" id="issue-45c3f8b0"><a class="self-link" href="#issue-45c3f8b0"></a> Make these checks no longer associated with an entry. <a href="https://github.com/whatwg/fs/issues/101">[Issue #whatwg/fs#101]</a></p> |
| 1016 | + <dl> |
1014 | 1017 | <dt data-md><a data-link-type="dfn" href="https://wicg.github.io/permissions-request/#permission-request-algorithm" id="ref-for-permission-request-algorithm">permission request algorithm</a>
|
1015 | 1018 | <dd data-md>
|
1016 | 1019 | <div class="algorithm" data-algorithm="permission request algorithm">
|
@@ -1495,22 +1498,14 @@ <h4 class="heading settled" data-level="3.2.2" id="api-filepickeroptions-startin
|
1495 | 1498 | <li data-md>
|
1496 | 1499 | <p>Let <var>origin</var> be <var>environment</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin" id="ref-for-concept-settings-object-origin③">origin</a>.</p>
|
1497 | 1500 | <li data-md>
|
1498 |
| - <p>If <var>startIn</var> is a <code class="idl"><a data-link-type="idl" href="https://fs.spec.whatwg.org/#filesystemhandle" id="ref-for-filesystemhandle⑥">FileSystemHandle</a></code>:</p> |
| 1501 | + <p>If <var>startIn</var> is a <code class="idl"><a data-link-type="idl" href="https://fs.spec.whatwg.org/#filesystemhandle" id="ref-for-filesystemhandle⑥">FileSystemHandle</a></code> and is not <a data-link-type="dfn">in the origin private file system</a>:</p> |
1499 | 1502 | <ol>
|
1500 | 1503 | <li data-md>
|
1501 |
| - <p>Let <var>entry</var> be <var>startIn</var>’s <a data-link-type="dfn">entry</a>.</p> |
| 1504 | + <p>Let <var>entry</var> be the result of <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#locating-an-entry" id="ref-for-locating-an-entry">locating an entry</a> given <var>startIn</var>’s <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#filesystemhandle-locator" id="ref-for-filesystemhandle-locator">locator</a>.</p> |
1502 | 1505 | <li data-md>
|
1503 |
| - <p>If <var>entry</var> does not represent a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry" id="ref-for-entry①">file system entry</a> in an <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#origin-private-file-system" id="ref-for-origin-private-file-system②">origin private file system</a>:</p> |
1504 |
| - <ol> |
1505 |
| - <li data-md> |
1506 |
| - <p>If <var>entry</var> is a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#file" id="ref-for-file">file entry</a>, and a path on the local file system |
1507 |
| - corresponding to the parent directory of <var>entry</var> can be determined, |
1508 |
| - then return that path.</p> |
1509 |
| - <li data-md> |
1510 |
| - <p>If <var>entry</var> is a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#directory" id="ref-for-directory">directory entry</a>, and a path on the local file system |
1511 |
| - corresponding to <var>entry</var> can be determined, |
1512 |
| - then return that path.</p> |
1513 |
| - </ol> |
| 1506 | + <p>If <var>entry</var> is a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#file" id="ref-for-file">file entry</a>, return the path of <var>entry</var>’s <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry-parent" id="ref-for-entry-parent②">parent</a> in the local file system.</p> |
| 1507 | + <li data-md> |
| 1508 | + <p>If <var>entry</var> is a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#directory" id="ref-for-directory">directory entry</a>, return <var>entry</var>’s path in the local file system.</p> |
1514 | 1509 | </ol>
|
1515 | 1510 | <li data-md>
|
1516 | 1511 | <p>If <var>id</var> is non-empty:</p>
|
@@ -1548,7 +1543,7 @@ <h4 class="heading settled" data-level="3.2.2" id="api-filepickeroptions-startin
|
1548 | 1543 | </div>
|
1549 | 1544 | <div class="algorithm" data-algorithm="remember a picked directory">
|
1550 | 1545 | To <dfn class="dfn-paneled" data-dfn-for="WellKnownDirectory" data-dfn-type="dfn" data-noexport id="wellknowndirectory-remember-a-picked-directory">remember a picked directory</dfn>, given an optional <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-string③">string</a> <var>id</var>,
|
1551 |
| -a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry" id="ref-for-entry②">file system entry</a> <var>entry</var>, and an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object" id="ref-for-environment-settings-object①">environment settings object</a> <var>environment</var>, |
| 1546 | +a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry" id="ref-for-entry①">file system entry</a> <var>entry</var>, and an <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object" id="ref-for-environment-settings-object①">environment settings object</a> <var>environment</var>, |
1552 | 1547 | run the following steps:
|
1553 | 1548 | <ol>
|
1554 | 1549 | <li data-md>
|
@@ -1834,7 +1829,7 @@ <h3 class="heading settled" data-level="3.6" id="drag-and-drop"><span class="sec
|
1834 | 1829 | <p>Run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑧">in parallel</a>:</p>
|
1835 | 1830 | <ol>
|
1836 | 1831 | <li data-md>
|
1837 |
| - <p>Let <var>entry</var> be the <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry" id="ref-for-entry③">file system entry</a> representing the dragged file or directory.</p> |
| 1832 | + <p>Let <var>entry</var> be the <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#entry" id="ref-for-entry②">file system entry</a> representing the dragged file or directory.</p> |
1838 | 1833 | <li data-md>
|
1839 | 1834 | <p>If <var>entry</var> is a <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#file" id="ref-for-file④">file entry</a>:</p>
|
1840 | 1835 | <ol>
|
@@ -1971,7 +1966,7 @@ <h3 class="heading settled" data-level="6.2" id="security-ransomware"><span clas
|
1971 | 1966 | Additionally user agents can grant write access to files at whatever granularity they deem
|
1972 | 1967 | appropriate.</p>
|
1973 | 1968 | <h3 class="heading settled" data-level="6.3" id="filling-up-disk"><span class="secno">6.3. </span><span class="content">Filling up a users disk</span><a class="self-link" href="#filling-up-disk"></a></h3>
|
1974 |
| - <p>Other than files in the <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#origin-private-file-system" id="ref-for-origin-private-file-system③">origin private file system</a>, files written by this API are not subject |
| 1969 | + <p>Other than files in the <a data-link-type="dfn" href="https://fs.spec.whatwg.org/#origin-private-file-system" id="ref-for-origin-private-file-system②">origin private file system</a>, files written by this API are not subject |
1975 | 1970 | to <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-quota" id="ref-for-storage-quota">storage quota</a>. As such websites can fill up a users disk without being limited by
|
1976 | 1971 | quota, which could leave a users device in a bad state (do note that even with storage that is
|
1977 | 1972 | subject to <a data-link-type="dfn" href="https://storage.spec.whatwg.org/#storage-quota" id="ref-for-storage-quota①">storage quota</a> it is still possible to fill up, or come close to filling up, a users
|
@@ -2148,23 +2143,35 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
|
2148 | 2143 | <span id="infopaneltitle-for-a3041a88fb118cb60f71471202b27eb9" style="display:none">Info about the 'file system entry' external reference.</span><a href="https://fs.spec.whatwg.org/#entry">https://fs.spec.whatwg.org/#entry</a><b>Referenced in:</b>
|
2149 | 2144 | <ul>
|
2150 | 2145 | <li><a href="#ref-for-entry">2.2. Permissions</a>
|
2151 |
| - <li><a href="#ref-for-entry①">3.2.2. Starting Directory</a> <a href="#ref-for-entry②">(2)</a> |
2152 |
| - <li><a href="#ref-for-entry③">3.6. Drag and Drop</a> |
| 2146 | + <li><a href="#ref-for-entry①">3.2.2. Starting Directory</a> |
| 2147 | + <li><a href="#ref-for-entry②">3.6. Drag and Drop</a> |
| 2148 | + </ul> |
| 2149 | + </aside> |
| 2150 | + <aside aria-labelledby="infopaneltitle-for-608afb57686bca41a876438f2ca4ea01" class="dfn-panel" data-for="608afb57686bca41a876438f2ca4ea01" id="infopanel-for-608afb57686bca41a876438f2ca4ea01"> |
| 2151 | + <span id="infopaneltitle-for-608afb57686bca41a876438f2ca4ea01" style="display:none">Info about the 'locating an entry' external reference.</span><a href="https://fs.spec.whatwg.org/#locating-an-entry">https://fs.spec.whatwg.org/#locating-an-entry</a><b>Referenced in:</b> |
| 2152 | + <ul> |
| 2153 | + <li><a href="#ref-for-locating-an-entry">3.2.2. Starting Directory</a> |
| 2154 | + </ul> |
| 2155 | + </aside> |
| 2156 | + <aside aria-labelledby="infopaneltitle-for-0c42b246e80597b912ea885389750d22" class="dfn-panel" data-for="0c42b246e80597b912ea885389750d22" id="infopanel-for-0c42b246e80597b912ea885389750d22"> |
| 2157 | + <span id="infopaneltitle-for-0c42b246e80597b912ea885389750d22" style="display:none">Info about the 'locator' external reference.</span><a href="https://fs.spec.whatwg.org/#filesystemhandle-locator">https://fs.spec.whatwg.org/#filesystemhandle-locator</a><b>Referenced in:</b> |
| 2158 | + <ul> |
| 2159 | + <li><a href="#ref-for-filesystemhandle-locator">3.2.2. Starting Directory</a> |
2153 | 2160 | </ul>
|
2154 | 2161 | </aside>
|
2155 | 2162 | <aside aria-labelledby="infopaneltitle-for-488b20e27377df2b11b91bf74aa477a8" class="dfn-panel" data-for="488b20e27377df2b11b91bf74aa477a8" id="infopanel-for-488b20e27377df2b11b91bf74aa477a8">
|
2156 | 2163 | <span id="infopaneltitle-for-488b20e27377df2b11b91bf74aa477a8" style="display:none">Info about the 'origin private file system' external reference.</span><a href="https://fs.spec.whatwg.org/#origin-private-file-system">https://fs.spec.whatwg.org/#origin-private-file-system</a><b>Referenced in:</b>
|
2157 | 2164 | <ul>
|
2158 | 2165 | <li><a href="#ref-for-origin-private-file-system">1. Introduction</a>
|
2159 | 2166 | <li><a href="#ref-for-origin-private-file-system①">2.2. Permissions</a>
|
2160 |
| - <li><a href="#ref-for-origin-private-file-system②">3.2.2. Starting Directory</a> |
2161 |
| - <li><a href="#ref-for-origin-private-file-system③">6.3. Filling up a users disk</a> |
| 2167 | + <li><a href="#ref-for-origin-private-file-system②">6.3. Filling up a users disk</a> |
2162 | 2168 | </ul>
|
2163 | 2169 | </aside>
|
2164 | 2170 | <aside aria-labelledby="infopaneltitle-for-473d71ed7162ce5db3c35957be1a084d" class="dfn-panel" data-for="473d71ed7162ce5db3c35957be1a084d" id="infopanel-for-473d71ed7162ce5db3c35957be1a084d">
|
2165 | 2171 | <span id="infopaneltitle-for-473d71ed7162ce5db3c35957be1a084d" style="display:none">Info about the 'parent' external reference.</span><a href="https://fs.spec.whatwg.org/#entry-parent">https://fs.spec.whatwg.org/#entry-parent</a><b>Referenced in:</b>
|
2166 | 2172 | <ul>
|
2167 | 2173 | <li><a href="#ref-for-entry-parent">2.2. Permissions</a> <a href="#ref-for-entry-parent①">(2)</a>
|
| 2174 | + <li><a href="#ref-for-entry-parent②">3.2.2. Starting Directory</a> |
2168 | 2175 | </ul>
|
2169 | 2176 | </aside>
|
2170 | 2177 | <aside aria-labelledby="infopaneltitle-for-837280b5a0a66b6ac9426b081795eb50" class="dfn-panel" data-for="837280b5a0a66b6ac9426b081795eb50" id="infopanel-for-837280b5a0a66b6ac9426b081795eb50">
|
@@ -2709,6 +2716,8 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
|
2709 | 2716 | <li><span class="dfn-paneled" id="8512fb29d0eb31edcc9f625c19168119">directory entry</span>
|
2710 | 2717 | <li><span class="dfn-paneled" id="6449045a7c035dd50b88afdac2cd2f46">file entry</span>
|
2711 | 2718 | <li><span class="dfn-paneled" id="a3041a88fb118cb60f71471202b27eb9">file system entry</span>
|
| 2719 | + <li><span class="dfn-paneled" id="608afb57686bca41a876438f2ca4ea01">locating an entry</span> |
| 2720 | + <li><span class="dfn-paneled" id="0c42b246e80597b912ea885389750d22">locator</span> |
2712 | 2721 | <li><span class="dfn-paneled" id="488b20e27377df2b11b91bf74aa477a8">origin private file system</span>
|
2713 | 2722 | <li><span class="dfn-paneled" id="473d71ed7162ce5db3c35957be1a084d">parent</span>
|
2714 | 2723 | <li><span class="dfn-paneled" id="837280b5a0a66b6ac9426b081795eb50">truncate(size)</span>
|
@@ -2920,6 +2929,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
|
2920 | 2929 | </pre>
|
2921 | 2930 | <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
|
2922 | 2931 | <div style="counter-reset:issue">
|
| 2932 | + <div class="issue"> Make these checks no longer associated with an entry. <a href="https://github.com/whatwg/fs/issues/101">[Issue #whatwg/fs#101]</a> <a class="issue-return" href="#issue-45c3f8b0" title="Jump to section">↵</a></div> |
2923 | 2933 | <div class="issue"> Ideally this user activation requirement would be defined upstream. <a href="https://github.com/WICG/permissions-request/issues/2">[Issue #WICG/permissions-request#2]</a> <a class="issue-return" href="#issue-88417955" title="Jump to section">↵</a></div>
|
2924 | 2934 | <div class="issue"> Currently <code class="idl"><a data-link-type="idl" href="#enumdef-filesystempermissionmode">FileSystemPermissionMode</a></code> can only be <code class="idl"><a data-link-type="idl" href="#dom-filesystempermissionmode-read">"read"</a></code> or <code class="idl"><a data-link-type="idl" href="#dom-filesystempermissionmode-readwrite">"readwrite"</a></code>. In
|
2925 | 2935 | the future we might want to add a "write" mode as well to support write-only handles. <a href="https://github.com/wicg/file-system-access/issues/119">[Issue #119]</a> <a class="issue-return" href="#issue-7fc2f5c7" title="Jump to section">↵</a></div>
|
|
0 commit comments