- From: Eric Uhrhane via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 28 Jun 2010 21:36:28 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/file-system In directory hutz:/tmp/cvs-serv14816 Modified Files: file-writer.html file-dir-sys.html Log Message: Rename FileReader and FileWriter to BlobReader and BlobWriter. The filenames don't change, just the text. Index: file-dir-sys.html =================================================================== RCS file: /sources/public/2009/dap/file-system/file-dir-sys.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- file-dir-sys.html 17 Jun 2010 18:34:40 -0000 1.7 +++ file-dir-sys.html 28 Jun 2010 21:36:26 -0000 1.8 @@ -750,10 +750,10 @@ </p> <dl title='[NoInterfaceObject] interface FileEntry : Entry, File' class='idl'> - <dt>FileWriter createWriter ()</dt> + <dt>BlobWriter createWriter ()</dt> <dd> <p> - Creates a new FileWriter associated with the file that this + Creates a new BlobWriter associated with the file that this FileEntry represents. </p> </dd> @@ -1263,10 +1263,10 @@ <dl title= '[NoInterfaceObject] interface FileEntrySync : EntrySync, File' class='idl'> - <dt>FileWriterSync createWriter ()</dt> + <dt>BlobWriterSync createWriter ()</dt> <dd> <p> - Creates a new FileWriterSync associated with the file that this + Creates a new BlobWriterSync associated with the file that this FileEntrySync represents. </p> </dd> Index: file-writer.html =================================================================== RCS file: /sources/public/2009/dap/file-system/file-writer.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- file-writer.html 17 Jun 2010 18:34:14 -0000 1.11 +++ file-writer.html 28 Jun 2010 21:36:26 -0000 1.12 @@ -40,10 +40,10 @@ <ul> <li> A <a>BlobBuilder</a> interface, which enables one to build a <code>Blob</code> from a String. - <li> A <a>FileWriter</a> interface, which provides methods to write a + <li> A <a>BlobWriter</a> interface, which provides methods to write a <code>Blob</code> to a file, and an event model to obtain the results of those writes.</li> - <li> A <a>FileWriterSync</a> interface, which provides methods to + <li> A <a>BlobWriterSync</a> interface, which provides methods to write a <code>Blob</code> to a file synchronously from the Worker context.</li> </ul> @@ -88,7 +88,7 @@ <section> <h2>Examples</h2> <p> - Here is a simple function that writes a text file, given a FileWriter: + Here is a simple function that writes a text file, given a BlobWriter: </p> <pre class='example sh_javascript'> function writeFile(writer) { @@ -107,10 +107,10 @@ } </pre> <p> - Here's an example of obtaining a <a>FileWriter</a> from a HTML input + Here's an example of obtaining a <a>BlobWriter</a> from a HTML input element: <pre class='example sh_javascript'> - var fileWriter = document.forms['downloadData']['fileChooser'].fileWriter; + var blobWriter = document.forms['downloadData']['fileChooser'].blobWriter; </pre> </p> </section> @@ -219,7 +219,7 @@ </section> </section> <section> - <h2>The <a>FileWriter</a> interface</h2> + <h2>The <a>BlobWriter</a> interface</h2> <p> This interface provides methods to write blobs to disk using progress events [[!PROGRESS-EVENTS]] and event handler attributes @@ -229,7 +229,7 @@ the context of the global object (Window [[!HTML5]]) as well as Web Workers (WorkerUtils [[!WEBWORKERS]]). </p> - <dl title='[NoInterfaceObject] interface FileWriter' class='idl'> + <dl title='[NoInterfaceObject] interface BlobWriter' class='idl'> <dt>void abort ()</dt> <dd> <p> @@ -253,18 +253,18 @@ </dd> <dt>const unsigned short WRITING = 1</dt> <dd> - The file is being written. + The blob is being written. </dd> <dt>const unsigned short DONE = 2</dt> <dd> The entire Blob has been written to the file, or a file error occurred during the write, or the write was aborted using <a>abort()</a>. The - FileWriter is no longer writing the file. + BlobWriter is no longer writing the blob. </dd> <dt>readonly attribute unsigned short readyState</dt> <dd> <p> - The FileWriter object can be in one of 3 states. The + The BlobWriter object can be in one of 3 states. The <a>readyState</a> attribute, on getting, MUST return the current state, which MUST be one of the following values: <ul> @@ -321,7 +321,7 @@ <p> The byte offset at which the next write to the file will occur. This MUST be no greater than <code>length</code>.<br /> - A newly-created FileWriter MUST have position set to 0. + A newly-created BlobWriter MUST have position set to 0. </p> </dd> <dt>readonly attribute long long length</dt> @@ -398,7 +398,7 @@ Seek sets the file position at which the next write will occur. </p> <p> - Seek may not be called while the <a>FileWriter</a> is in the + Seek may not be called while the <a>BlobWriter</a> is in the <code>WRITING</code> state. </p> <dl class='parameters'> @@ -411,7 +411,7 @@ <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. + A newly-created BlobWriter MUST have position set to 0. </p> </dd> </dl> @@ -495,27 +495,27 @@ </dd> </dl> <section> - <h2>The FileWriter Task Source</h2> + <h2>The BlobWriter Task Source</h2> <!--> TODO: Figure out how to do the references properly. Maybe just use raw links to a reference section, as in the File API spec. <--> <p> - The <a>FileWriter</a> interface enables asynchronous writes on + The <a>BlobWriter</a> interface enables asynchronous writes on individual files by dispatching events to event handler methods. Unless stated otherwise, the task source [[!HTML5]] that is used in this - specification is the <a>FileWriter</a>. This task source [[!HTML5]] is + specification is the <a>BlobWriter</a>. This task source [[!HTML5]] is used for events tasks that are asynchronously dispatched, or for event tasks that are queued for dispatching. </p> </section> </section> <section> - <h2>The <code>FileWriterSync</code> interface</h2> + <h2>The <code>BlobWriterSync</code> interface</h2> <p> - FileWriterSync description + BlobWriterSync description </p> - <dl title='[NoInterfaceObject] interface FileWriterSync' class='idl'> + <dl title='[NoInterfaceObject] interface BlobWriterSync' class='idl'> <dt>readonly attribute long long position</dt> <dd> <p> @@ -645,7 +645,7 @@ </p> <p> A web application may attempt to initiate a write, seek, or truncate via - a FileWriter in the <a>FileWriter-WRITING</a> state.<br/> + a BlobWriter in the <a>BlobWriter-WRITING</a> state.<br/> See INVALID_STATE_ERR </p> <p> @@ -662,7 +662,7 @@ <p> This interface extends the <a>FileError</a> interface described in [[!FILE-API]] to add several new error codes. It is used to report - errors asynchronously. The FileWriter object's error attribute is a + errors asynchronously. The BlobWriter object's error attribute is a FileError object, and is accessed asynchronously through the onerror event handler when error events are generated. </p> @@ -746,7 +746,7 @@ <tr> <td>INVALID_STATE_ERR</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> + initiate a write, truncate, or seek using a <a>BlobWriter</a> which is already in the <a>WRITING</a> state. </td> </tr> @@ -783,16 +783,16 @@ </section> </section> <section> - <h2>Obtaining file writers</h2> + <h2>Obtaining blob writers</h2> <p> - This spec describes one way to obtain a FileWriter. Not all <a>user + This spec describes one way to obtain a BlobWriter. Not all <a>user agents</a> may implement this, and other methods may be provided by other specs. </p> <div class='issue'> <p> The group has not at this time reached consensus on the best manner in - which to obtain access to a file writer. + which to obtain access to a blob writer. Issues with an input control: <ol> @@ -800,17 +800,17 @@ ugly and unhelpful [suggested fix: use a new button type instead, which then would fall back to a button that could be hooked with JavaScript to do something useful].</li> - <li>A FileWriter can write a file multiple times; this differs from + <li>A BlobWriter can write a file multiple times; this differs from the "SaveAs" semantic, and may be unintuitive to users. Smart UI may help this, but may not completely obviate confusion. [suggested - fix: add a "close" function to FileWriter; until it's called, show + fix: add a "close" function to BlobWriter; until it's called, show the download manager and indicate that the file is active]. </ol> One suggested alternative, a programmatic API that creates a - FileWriter, also has issues: + BlobWriter, also has issues: <ol> - <li>It makes the standard FileWriter usage flow involve popping up a + <li>It makes the standard BlobWriter usage flow involve popping up a "SaveAs" dialog without user initiation.</li> <li>If the API pops up the SaveAs on write(), using multiple write calls to produce a file becomes annoying. If the API pops up on @@ -836,27 +836,27 @@ </p> </div> <div class='issue'> - This spec does not yet provide any way to obtain a FileWriterSync. It - may be useful for a FileWriter to be passed via postMessage to a Worker. - Perhaps Workers should be able to convert a FileWriter to a - FileWriterSync at will? Note that we may want to invalidate any - FileWriter sent by postMessage or converted to a FileWriterSync, to + This spec does not yet provide any way to obtain a BlobWriterSync. It + may be useful for a BlobWriter to be passed via postMessage to a Worker. + Perhaps Workers should be able to convert a BlobWriter to a + BlobWriterSync at will? Note that we may want to invalidate any + BlobWriter sent by postMessage or converted to a BlobWriterSync, to reduce problems of having the same underlying handle open in two places. </div> <section> - <h2>Obtaining file writers via HTML input element</h2> + <h2>Obtaining blob writers via HTML input element</h2> <p> A new HTML input element state is added with <code>type=saveas</code>, corresponding to the <code>File SaveAs</code> state. This functions similarly to the <code>File Upload</code> state, except that instead of presenting a File-Open picker and returning a list of <code>File</code> objects, it presents a File-Save-As picker and - returns a single <a>FileWriter</a>. Here is a description of an input + returns a single <a>BlobWriter</a>. Here is a description of an input element in the File SaveAs state. </p> <p> The input element represents write access to a selected file, embodied - as a <a>FileWriter</a>. + as a <a>BlobWriter</a>. </p> <p> If the element is mutable, the user agent should allow the user to @@ -872,7 +872,7 @@ There must be no more than one file selected. </p> <p> - A FileWriter obtained from such an element MUST begin with + A BlobWriter obtained from such an element MUST begin with <a>position</a> and <a>length</a> each set to 0, as no read access of any kind is granted by the user's selection of the file. </p> @@ -883,14 +883,14 @@ the element: <code>required</code>. <li>The following common input element IDL attribute applies to the element: <code>value</code>.</li> - <li>A new IDL attribute <code>fileWriter</code> applies, which holds - a reference to a <a>FileWriter</a> object. + <li>A new IDL attribute <code>blobWriter</code> applies, which holds + a reference to a <a>BlobWriter</a> object. <li>The <code>value</code> IDL attribute is in mode <code>filename</code>, with the exception that there is only a - single selected file, <code>fileWriter</code>, not a list, + single selected file, <code>blobWriter</code>, not a list, <code>files</code>. This means that setting <code>value</code> on an input element in the File SaveAs state will clear - <code>fileWriter</code> rather than <code>files</code>.</li> + <code>blobWriter</code> rather than <code>files</code>.</li> <li>The change event applies.</li> <li>The following content attributes must not be specified and do not apply to the element: <code>accept</code>, <code>alt</code>, @@ -943,7 +943,7 @@ file or any of that file's metadata [including length]. This specification describes a way in which that information can be kept secret for write-only files. If the application has obtained a - <a>FileWriter</a> through a mechanism that also implies read access, + <a>BlobWriter</a> through a mechanism that also implies read access, those restrictions may be relaxed. </p> </section>
Received on Monday, 28 June 2010 21:36:29 UTC