- From: Eric Uhrhane via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 11 Dec 2010 02:44:47 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/file-system In directory hutz:/tmp/cvs-serv7680 Modified Files: file-dir-sys.html Log Message: Fix example. Add exception to FileEntrySync.createWriter. Index: file-dir-sys.html =================================================================== RCS file: /sources/public/2009/dap/file-system/file-dir-sys.html,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- file-dir-sys.html 25 Oct 2010 23:42:52 -0000 1.26 +++ file-dir-sys.html 11 Dec 2010 02:44:45 -0000 1.27 @@ -132,6 +132,8 @@ <section> <h2>Examples</h2> <pre class='example sh_javascript'> + // In the DOM or worker context: + function useAsyncFS(fs) { // see getAsText example in [[!FILE-API]]. fs.root.getFile("already_there.txt", null, function (f) { @@ -143,16 +145,13 @@ f.createWriter(writeDataToLogFile); }); } - - // In the DOM or worker context: - - requestFileSystem(false, 1024 * 1024, function(fs) { + requestFileSystem(TEMPORARY, 1024 * 1024, function(fs) { useAsyncFS(fs); }); // In a worker: - var tempFS = requestFileSystem(false, 1024 * 1024); + var tempFS = requestFileSystem(TEMPORARY, 1024 * 1024); var logFile = tempFS.root.getFile("logFile", {create: true}); var writer = logFile.createWriter(); writer.seek(writer.length); @@ -1442,6 +1441,16 @@ Creates a new <code>FileWriterSync</code> associated with the file that this <code>FileEntrySync</code> represents. </p> + <dl class='exception' title='FileException'> + <dt>NOT_FOUND_ERR</dt> + <dd>The entry no longer exists.</dd> + <dt>INVALID_STATE_ERR</dt> + <dd>This FileEntrySync is no longer valid for some reason other + than it having been deleted.</dd> + <dt>SECURITY_ERR</dt> + <dd>The <a>user agent</a> determined that it was not safe to carry + out this action.</dd> + </dl> </dd> <dt>File file ()</dt> <dd>
Received on Saturday, 11 December 2010 02:44:51 UTC