2009/dap/file-system file-dir-sys.html,1.21,1.22 file-writer.html,1.20,1.21

Update of /sources/public/2009/dap/file-system
In directory hutz:/tmp/cvs-serv7231

Modified Files:
	file-dir-sys.html file-writer.html 
Log Message:
Change file length and offsets to be unsigned, except as input to seek.
Update error codes to use the new 1-based numbering from File API.
Add a couple of new errors requested for FileSystem.
Add restriction on removing the root directory of a FileSystem.


Index: file-dir-sys.html
===================================================================
RCS file: /sources/public/2009/dap/file-system/file-dir-sys.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- file-dir-sys.html	28 Sep 2010 22:18:57 -0000	1.21
+++ file-dir-sys.html	15 Oct 2010 02:43:43 -0000	1.22
@@ -312,7 +312,7 @@
                   as defined above.  Use one of <code>TEMPORARY</code> or
                   <code>PERSISTENT</code>.
                 </dd>
-                <dt>long long size</dt>
+                <dt>unsigned long long size</dt>
                 <dd>
                   This is an indicator of how much storage space, in bytes, the
                   application expects to need.
@@ -386,7 +386,7 @@
                   as defined above.  Use one of <code>TEMPORARY</code> or
                   <code>PERSISTENT</code>.
                 </dd>
-                <dt>long long size</dt>
+                <dt>unsigned long long size</dt>
                 <dd>
                   This is an indicator of how much storage space, in bytes, the
                   application expects to need.
@@ -644,7 +644,8 @@
           <dd>
             <p>
               Deletes a file or directory.  It is an error to attempt to delete
-              a directory that is not empty.
+              a directory that is not empty.  It is an error to attempt to
+              delete the root directory of a filesystem.
             </p>
             <dl class='parameters'>
               <dt>VoidCallback successCallback</dt>
@@ -774,7 +775,8 @@
               Deletes a directory and all of its contents, if any.  In the event
               of an error [e.g. trying to delete a directory that contains a
               file that cannot be removed], some of the contents of the
-              directory MAY be deleted.
+              directory MAY be deleted.  It is an error to attempt to delete the
+              root directory of a filesystem.
             </p>
             <dl class='parameters'>
               <dt>VoidCallback successCallback</dt>
@@ -1213,7 +1215,8 @@
           <dd>
             <p>
               Deletes a file or directory.  It is an error to attempt to delete
-              a directory that is not empty.
+              a directory that is not empty.  It is an error to attempt to
+              delete the root directory of a filesystem.
             </p>
             <dl class='exception' title='FileException'>
               <dt>NOT_FOUND_ERR</dt>
@@ -1293,17 +1296,19 @@
               <dt>NOT_FOUND_ERR</dt>
               <dd>The path was structurally correct, but refers to a resource
               that does not exist.</dd>
-              <dt>INVALID_MODIFICATION_ERR</dt>
-              <dd>The user attempted to create a file where an element already
-              exists.
               <dt>NO_MODIFICATION_ALLOWED_ERR</dt>
               <dd>The target directory or file is not writable.</dd>
+              <dt>PATH_EXISTS_ERR</dt>
+              <dd>The user attempted to create a file where an element already
+              exists.
               <dt>QUOTA_EXCEEDED_ERR</dt>
               <dd>The operation would cause the application to exceed its
               storage quota.</dd>
               <dt>SECURITY_ERR</dt>
               <dd>The application does not have permission to access the
               element referred to by path.</dd>
+              <dt>TYPE_MISMATCH_ERR</dt>
+              <dd>The path supplied exists, but is not a directory.</dd>
             </dl>
           </dd>
           <dt>DirectoryEntrySync getDirectory ()</dt>
@@ -1344,7 +1349,7 @@
               that does not exist.</dd>
               <dt>NO_MODIFICATION_ALLOWED_ERR</dt>
               <dd>The target directory is not writable.</dd>
-              <dt>INVALID_MODIFICATION_ERR</dt>
+              <dt>PATH_EXISTS_ERR</dt>
               <dd>The user attempted to create a directory where an element
               already exists.
               <dt>QUOTA_EXCEEDED_ERR</dt>
@@ -1353,6 +1358,8 @@
               <dt>SECURITY_ERR</dt>
               <dd>The application does not have permission to access the
               element referred to by path.</dd>
+              <dt>TYPE_MISMATCH_ERR</dt>
+              <dd>The path supplied exists, but is not a directory.</dd>
             </dl>
           </dd>
           <dt>void removeRecursively ()</dt>
@@ -1361,7 +1368,8 @@
               Deletes a directory and all of its contents, if any.  In the event
               of an error [e.g. trying to delete a directory that contains a
               file that cannot be removed], some of the contents of the
-              directory MAY be deleted.
+              directory MAY be deleted.  It is an error to attempt to delete the
+              root directory of a filesystem.
             </p>
             <dl class='exception' title='FileException'>
               <dt>NOT_FOUND_ERR</dt>
@@ -1465,23 +1473,29 @@
             It is used to report errors asynchronously.
           </p>
           <dl title='interface FileError' class='idl'>
-            <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7</dt>
+            <dt>const unsigned short NOT_FOUND_ERR = 1</dt>
             <dd> </dd>
-            <dt>const unsigned short NOT_FOUND_ERR = 8</dt>
+            <dt>const unsigned short SECURITY_ERR = 2</dt>
             <dd> </dd>
-            <dt>const unsigned short INVALID_STATE_ERR = 11</dt>
+            <dt>const unsigned short ABORT_ERR = 3</dt>
             <dd> </dd>
-            <dt>const unsigned short INVALID_MODIFICATION_ERR = 13</dt>
+            <dt>const unsigned short NOT_READABLE_ERR = 4</dt>
             <dd> </dd>
-            <dt>const unsigned short SECURITY_ERR = 18</dt>
+            <dt>const unsigned short ENCODING_ERR = 5</dt>
             <dd> </dd>
-            <dt>const unsigned short ABORT_ERR = 20</dt>
+            <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6</dt>
             <dd> </dd>
-            <dt>const unsigned short QUOTA_EXCEEDED_ERR = 22</dt>
+            <dt>const unsigned short INVALID_STATE_ERR = 7</dt>
             <dd> </dd>
-            <dt>const unsigned short NOT_READABLE_ERR = 24</dt>
+            <dt>const unsigned short SYNTAX_ERR = 8</dt>
             <dd> </dd>
-            <dt>const unsigned short ENCODING_ERR = 26</dt>
+            <dt>const unsigned short INVALID_MODIFICATION_ERR = 9</dt>
+            <dd> </dd>
+            <dt>const unsigned short QUOTA_EXCEEDED_ERR = 10</dt>
+            <dd> </dd>
+            <dt>const unsigned short TYPE_MISMATCH_ERR = 11</dt>
+            <dd> </dd>
+            <dt>const unsigned short PATH_EXISTS_ERR = 12</dt>
             <dd> </dd>
             <dt>attribute unsigned short code</dt>
             <dd>
@@ -1501,23 +1515,29 @@
           the synchronous filesystem methods, are reported using the
           FileException exception.
         <dl title='exception FileException' class='idl'>
-          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7</dt>
+          <dt>const unsigned short NOT_FOUND_ERR = 1</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_FOUND_ERR = 8</dt>
+          <dt>const unsigned short SECURITY_ERR = 2</dt>
           <dd> </dd>
-          <dt>const unsigned short INVALID_STATE_ERR = 11</dt>
+          <dt>const unsigned short ABORT_ERR = 3</dt>
           <dd> </dd>
-          <dt>const unsigned short INVALID_MODIFICATION_ERR = 13</dt>
+          <dt>const unsigned short NOT_READABLE_ERR = 4</dt>
           <dd> </dd>
-          <dt>const unsigned short SECURITY_ERR = 18</dt>
+          <dt>const unsigned short ENCODING_ERR = 5</dt>
           <dd> </dd>
-          <dt>const unsigned short ABORT_ERR = 20</dt>
+          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6</dt>
           <dd> </dd>
-          <dt>const unsigned short QUOTA_EXCEEDED_ERR = 22</dt>
+          <dt>const unsigned short INVALID_STATE_ERR = 7</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_READABLE_ERR = 24</dt>
+          <dt>const unsigned short SYNTAX_ERR = 8</dt>
           <dd> </dd>
-          <dt>const unsigned short ENCODING_ERR = 26</dt>
+          <dt>const unsigned short INVALID_MODIFICATION_ERR = 9</dt>
+          <dd> </dd>
+          <dt>const unsigned short QUOTA_EXCEEDED_ERR = 10</dt>
+          <dd> </dd>
+          <dt>const unsigned short TYPE_MISMATCH_ERR = 11</dt>
+          <dd> </dd>
+          <dt>const unsigned short PATH_EXISTS_ERR = 12</dt>
           <dd> </dd>
           <dt>readonly attribute unsigned short code</dt>
           <dd>

Index: file-writer.html
===================================================================
RCS file: /sources/public/2009/dap/file-system/file-writer.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- file-writer.html	28 Sep 2010 21:48:51 -0000	1.20
+++ file-writer.html	15 Oct 2010 02:43:43 -0000	1.21
@@ -360,7 +360,7 @@
         <dt>readonly attribute FileError error</dt>
         <dd>
           <p>
-          Description of error
+          The last error that occurred on the <code>FileSaver</code>.
           </p>
         </dd>
         <dt>attribute Function onwritestart</dt>
@@ -547,7 +547,7 @@
       </div>
       <dl title='[NoInterfaceObject] interface FileWriter : FileSaver'
           class='idl'>
-        <dt>readonly attribute long long position</dt>
+        <dt>readonly attribute unsigned long long position</dt>
         <dd>
           <p>
           The byte offset at which the next write to the file will occur.
@@ -555,7 +555,7 @@
           A newly-created FileWriter MUST have position set to 0.
           </p>
         </dd>
-        <dt>readonly attribute long long length</dt>
+        <dt>readonly attribute unsigned long long length</dt>
         <dd>
           <p>
           The length of the file.  If the user does not have read access to the
@@ -635,16 +635,15 @@
           <code>WRITING</code> state.
           </p>
           <dl class='parameters'>
-            <dt>long long position</dt>
+            <dt>long long offset</dt>
             <dd>
               <p>
-              An absolute byte offset into the file.  If <code>position</code>
+              An absolute byte offset into the file.  If <code>offset</code>
               is greater than <code>length</code>, <code>length</code> is used
-              instead.  If <code>position</code> is less than zero,
+              instead.  If <code>offset</code> is less than zero,
               <code>length</code> is added to it, so that it is treated as an
               offset back from the end of the file.  If it is still less than
               zero, zero is used.<br />
-              A newly-created FileWriter MUST have position set to 0.
               </p>
             </dd>
           </dl>
@@ -709,7 +708,7 @@
           </ol>
           </p>
           <dl class='parameters'>
-            <dt>long long size</dt>
+            <dt>unsigned long long size</dt>
             <dd>
               The size to which the length of the file is to be adjusted,
               measured in bytes.
@@ -741,14 +740,14 @@
           spec</a>.
       </div>
       <dl title='[NoInterfaceObject] interface FileWriterSync' class='idl'>
-        <dt>readonly attribute long long position</dt>
+        <dt>readonly attribute unsigned long long position</dt>
         <dd>
           <p>
             The byte offset at which the next write to the file will occur.
             This MUST be no greater than <code>length</code>.
           </p>
         </dd>
-        <dt>readonly attribute long long length</dt>
+        <dt>readonly attribute unsigned long long length</dt>
         <dd>
           <p>
             The length of the file.  If the user does not have read access to
@@ -788,11 +787,11 @@
           Seek sets the file position at which the next write will occur.
           </p>
           <dl class='parameters'>
-            <dt>long long position</dt>
+            <dt>long long offset</dt>
             <dd>
-            An absolute byte offset into the file.  If <code>position</code>
+            An absolute byte offset into the file.  If <code>offset</code>
             is greater than <code>length</code>, <code>length</code> is used
-            instead.  If <code>position</code> is less than zero,
+            instead.  If <code>offset</code> is less than zero,
             <code>length</code> is added to it, so that it is treated as an
             offset back from the end of the file.  If it is still less than
             zero, zero is used.
@@ -825,7 +824,7 @@
             </ul>
           </p>
           <dl class='parameters'>
-            <dt>long long size</dt>
+            <dt>unsigned long long size</dt>
             <dd>
               The size to which the length of the file is to be adjusted,
               measured in bytes.
@@ -902,19 +901,21 @@
           event handler when error events are generated.
         </p>
         <dl title='interface FileError' class='idl'>
-          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7</dt>
+          <dt>const unsigned short NOT_FOUND_ERR = 1</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_FOUND_ERR = 8</dt>
+          <dt>const unsigned short SECURITY_ERR = 2</dt>
           <dd> </dd>
-          <dt>const unsigned short INVALID_STATE_ERR = 11</dt>
+          <dt>const unsigned short ABORT_ERR = 3</dt>
           <dd> </dd>
-          <dt>const unsigned short SYNTAX_ERR = 12</dt>
+          <dt>const unsigned short NOT_READABLE_ERR = 4</dt>
           <dd> </dd>
-          <dt>const unsigned short SECURITY_ERR = 18</dt>
+          <dt>const unsigned short ENCODING_ERR = 5</dt>
           <dd> </dd>
-          <dt>const unsigned short ABORT_ERR = 20</dt>
+          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_READABLE_ERR = 24</dt>
+          <dt>const unsigned short INVALID_STATE_ERR = 7</dt>
+          <dd> </dd>
+          <dt>const unsigned short SYNTAX_ERR = 8</dt>
           <dd> </dd>
           <dt>readonly attribute unsigned short code</dt>
           <dd> </dd>
@@ -931,19 +932,21 @@
           occur during use of the synchronous write methods for Web Workers
           [[WEBWORKERS]] are reported using the FileException exception.
         <dl title='exception FileException' class='idl'>
-          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7</dt>
+          <dt>const unsigned short NOT_FOUND_ERR = 1</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_FOUND_ERR = 8</dt>
+          <dt>const unsigned short SECURITY_ERR = 2</dt>
           <dd> </dd>
-          <dt>const unsigned short INVALID_STATE_ERR = 11</dt>
+          <dt>const unsigned short ABORT_ERR = 3</dt>
           <dd> </dd>
-          <dt>const unsigned short SYNTAX_ERR = 12</dt>
+          <dt>const unsigned short NOT_READABLE_ERR = 4</dt>
           <dd> </dd>
-          <dt>const unsigned short SECURITY_ERR = 18</dt>
+          <dt>const unsigned short ENCODING_ERR = 5</dt>
           <dd> </dd>
-          <dt>const unsigned short ABORT_ERR = 20</dt>
+          <dt>const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6</dt>
           <dd> </dd>
-          <dt>const unsigned short NOT_READABLE_ERR = 24</dt>
+          <dt>const unsigned short INVALID_STATE_ERR = 7</dt>
+          <dd> </dd>
+          <dt>const unsigned short SYNTAX_ERR = 8</dt>
           <dd> </dd>
           <dt>unsigned short code</dt>
           <dd> </dd>

Received on Friday, 15 October 2010 02:43:47 UTC