- From: Eric Uhrhane via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 27 May 2011 18:15:43 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/file-system In directory hutz:/tmp/cvs-serv10489 Modified Files: file-dir-sys.html file-writer.html Log Message: Fix a typo in FileWriter's error code descriptions, and sort them alphabetically to match FileSystem. Update FileWriter's "uniformity of interface" to switch to case-sensitive, unrestricted filesystem. Index: file-dir-sys.html =================================================================== RCS file: /sources/public/2009/dap/file-system/file-dir-sys.html,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- file-dir-sys.html 6 May 2011 14:21:04 -0000 1.33 +++ file-dir-sys.html 27 May 2011 18:15:40 -0000 1.34 @@ -1702,61 +1702,47 @@ applications that work on all platforms, we enforce certain restrictions and make certain guarantees with respect to paths used in this API. </p> - <p> - These restrictions are intended to prevent developers from accidentally - requiring the creation of paths that can only be created on a subset of - platforms. They are not intended to prevent access to files created - outside of this API. - </p> </section> The implementation MUST refuse to create any file or directory whose name - or existence would violate these rules. The implementation MAY accept a - noncompliant path where it is used to look up an Entry or EntrySync for an - existing file or directory. The implementation MUST NOT accept a - noncompliant path where it designates the new name of a file or directory - to be moved, copied, or created. - </p> + or existence would violate these rules. The implementation MUST NOT + accept a noncompliant path where it designates the new name of a file or + directory to be moved, copied, or created. <div class='issue'> <p> - What about path and path segment lengths? For portability we should - probably clip segments at 255 bytes of UTF-8 in normalization form D, - and clip paths at 4095 bytes, but users can't easily check the byte - length of strings, or renormalize, so that makes for an annoying API. - It's also hard to control the true length of a path, due to renames of - parent directories, so we really just want to reject the - obviously-too-long; they won't often really come up anyway. - </p> - <p> - What about normalization? Are two different normalizations of the - same string equivalent as filenames? We don't want to let any - underlying platform behaviors leak through. This could be solved for - in-API paths by supplying a "filenames are equal" function and - normalizing everything inside the API, but we'd have to do it in both - directions, since paths created outside the API might not be - normalized. + TODO(ericu): Spec the exception given for noncompliant paths. </p> </div> + </p> <section> <h2>Case-sensitivity</h2> <p> - Paths in this filesystem are case-insensitive and case-preserving, - regardless of the rules of the underlying filesystem, if any. + Paths in this filesystem MUST be case sensitive and case-preserving. </p> + </section> + <section> + <h2>Encoding</h2> <p> - Case-insensitivity SHOULD respect the locale of the user. + Implementations MUST accept any valid UTF-8 sequence + as a path segment, so long as it does not include any characters + or sequences restricted below. When returning paths or path segments, + implementations MUST return them in the same normalization in which + they were presented. + </p> + </section> + <section> + <h2>Naming restrictions</h2> + <p>File and directory names MUST NOT contain either of the following + characters: + <ul> + <li>'/' (U+002F)</li> + <li>NUL (U+0000)</li> + </ul> </p> - <div class='issue'> - We could choose the user or the author; I think the user's probably - the better way to go. There are still situations in which you can get - into trouble, but matching the locale of the user's computer should - avoid many of the most common conflicts. - </div> </section> <section> <h2>Directories</h2> <p> - The directory separator is '/', regardless of the directory separator - used by the underlying system, if any. + The directory separator is '/' (U+002F). </p> <p> The character '/', when it is the first character in a path, refers to @@ -1788,62 +1774,19 @@ 'foo' in the parent of the directory on whose DirectoryEntry or DirectoryEntrySync the method receiving the path is being called. </p> - <p> - Directories MUST NOT be made to contain more than 5000 entries. - </p> </section> - <section> - <h2>Naming restrictions</h2> + <div class='issue'> <p> - Files and directories MUST NOT be named any of the following, and MUST - NOT begin with any of the following followed by a period. - <ul> - <li>CON</li> - <li>PRN</li> - <li>AUX</li> - <li>NUL</li> - <li>COM1</li> - <li>COM2</li> - <li>COM3</li> - <li>COM4</li> - <li>COM5</li> - <li>COM6</li> - <li>COM7</li> - <li>COM8</li> - <li>COM9</li> - <li>LPT1</li> - <li>LPT2</li> - <li>LPT3</li> - <li>LPT4</li> - <li>LPT5</li> - <li>LPT6</li> - <li>LPT7</li> - <li>LPT8</li> - <li>LPT9</li> - </ul> - These restrictions hold regardless of case, i.e. "con", "PrN" are also - illegal. - </p> - <p>File and directory names MUST NOT end in period or space. - </p> - <p>File and directory names MUST NOT contain any of the following - characters: - <ul> - <li>/</li> - <li>\</li> - <li><</li> - <li>></li> - <li>:</li> - <li>?</li> - <li>*</li> - <li>"</li> - <li>|</li> - </ul> + What about path and path segment lengths? Should we limit them at + all? It's hard to control the true length of a path, due to + renames of parent directories, so we really just want to reject the + obviously-too-long; they won't often really come up anyway. + We should at least provide minimum lengths for paths and segments. </p> - <p>File and directory names MUST NOT contain any character whose - representation in UTF-8 is between 0 and 31, inclusive. + <p> + Should we limit the number of elements in a directory? </p> - </section> + </div> </section> <section class='appendix'> <h2>Acknowledgements</h2> Index: file-writer.html =================================================================== RCS file: /sources/public/2009/dap/file-system/file-writer.html,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- file-writer.html 4 May 2011 18:08:01 -0000 1.29 +++ file-writer.html 27 May 2011 18:15:40 -0000 1.30 @@ -941,6 +941,8 @@ <dd> </dd> <dt>const unsigned short SYNTAX_ERR = 8</dt> <dd> </dd> + <dt>const unsigned short QUOTA_EXCEEDED_ERR = 10</dt> + <dd> </dd> <dt>readonly attribute unsigned short code</dt> <dd> </dd> </dl> @@ -972,6 +974,8 @@ <dd> </dd> <dt>const unsigned short SYNTAX_ERR = 8</dt> <dd> </dd> + <dt>const unsigned short QUOTA_EXCEEDED_ERR = 10</dt> + <dd> </dd> <dt>unsigned short code</dt> <dd> </dd> </dl> @@ -986,11 +990,17 @@ <tr><th>Name</th><th>Value</th><th>Description</th></tr> </thead> <tbody> - <tr> - <td><dfn>NO_MODIFICATION_ALLOWED_ERR</dfn></td><td>7</td> - <td>User agents MUST use this code when attempting to write to a - file which cannot be modified due to the state of the - underlying filesystem. + <tr> + <td><dfn>ABORT_ERR</dfn></td><td>20</td> + <td>User agents MUST use this code if the read operation was + aborted, typically with a call to <a>abort()</a>. + </td> + </tr> + <tr> + <td><dfn>INVALID_STATE_ERR</dfn></td><td>11</td> + <td>User agents MUST use this code if an application attempts to + initiate a write, truncate, or seek using a <a>FileWriter</a> + which is already in the <a>WRITING</a> state. </td> </tr> <tr> @@ -1005,17 +1015,19 @@ </ul> </td> </tr> - <tr> - <td><dfn>INVALID_STATE_ERR</dfn></td><td>11</td> - <td>User agents MUST use this code if an application attempts to - initiate a write, truncate, or seek using a <a>FileWriter</a> - which is already in the <a>WRITING</a> state. + <tr> + <td><dfn>NO_MODIFICATION_ALLOWED_ERR</dfn></td><td>6</td> + <td>User agents MUST use this code when attempting to write to a + file which cannot be modified due to the state of the + underlying filesystem. </td> </tr> <tr> - <td><dfn>SYNTAX_ERR</dfn></td><td>12</td> - <td>User agents MUST use this code when an application attempts - to supply an invalid line ending specifier to the API. + <td><dfn>QUOTA_EXCEEDED_ERR</dfn></td><td>10</td> + <td> + <a>user agent</a> MUST use this code if the operation failed + because it would cause the application to exceed its storage + quota. </td> </tr> <tr> @@ -1035,9 +1047,9 @@ </td> </tr> <tr> - <td><dfn>ABORT_ERR</dfn></td><td>20</td> - <td>User agents MUST use this code if the read operation was - aborted, typically with a call to <a>abort()</a>. + <td><dfn>SYNTAX_ERR</dfn></td><td>12</td> + <td>User agents MUST use this code when an application attempts + to supply an invalid line ending specifier to the API. </td> </tr> </tbody>
Received on Friday, 27 May 2011 18:15:44 UTC