diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/api/file_system.idl | 14 | ||||
-rw-r--r-- | chrome/common/extensions/docs/server2/templates/articles/app_storage.html | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/chrome/common/extensions/api/file_system.idl b/chrome/common/extensions/api/file_system.idl index 999b68e..f101430 100644 --- a/chrome/common/extensions/api/file_system.idl +++ b/chrome/common/extensions/api/file_system.idl @@ -18,7 +18,7 @@ namespace fileSystem { DOMString[]? extensions; }; - dictionary ChooseFileOptions { + dictionary ChooseEntryOptions { // Type of the prompt to show. Valid types are 'openFile', // 'openWritableFile' or 'saveFile'. // @@ -59,15 +59,15 @@ namespace fileSystem { // Get a writable FileEntry from another FileEntry. This call will fail if // the application does not have the 'write' permission under 'fileSystem'. - static void getWritableFileEntry([instanceOf=FileEntry] object fileEntry, - FileEntryCallback callback); + static void getWritableEntry([instanceOf=FileEntry] object fileEntry, + FileEntryCallback callback); // Gets whether this FileEntry is writable or not. - static void isWritableFileEntry([instanceOf=FileEntry] object fileEntry, - IsWritableCallback callback); + static void isWritableEntry([instanceOf=FileEntry] object fileEntry, + IsWritableCallback callback); // Ask the user to choose a file. - static void chooseFile(optional ChooseFileOptions options, - FileEntryCallback callback); + static void chooseEntry(optional ChooseEntryOptions options, + FileEntryCallback callback); }; }; diff --git a/chrome/common/extensions/docs/server2/templates/articles/app_storage.html b/chrome/common/extensions/docs/server2/templates/articles/app_storage.html index 83ddc51..77c65d7 100644 --- a/chrome/common/extensions/docs/server2/templates/articles/app_storage.html +++ b/chrome/common/extensions/docs/server2/templates/articles/app_storage.html @@ -167,7 +167,7 @@ If the file doesn't exist, an error is thrown. var chosenFileEntry = null; chooseFileButton.addEventListener('click', function(e) { - chrome.fileSystem.chooseFile({type: 'openFile'}, function(readOnlyEntry) { + chrome.fileSystem.chooseEntry({type: 'openFile'}, function(readOnlyEntry) { readOnlyEntry.file(function(file) { var reader = new FileReader(); @@ -189,13 +189,13 @@ chooseFileButton.addEventListener('click', function(e) { The two common use-cases for writing a file are "Save" and "Save as". The following code creates a -<code>writableFileEntry</code> +<code>writableEntry</code> from the read-only <code>chosenFileEntry</code> and writes the selected file to it. </p> <pre> - chrome.fileSystem.getWritableFileEntry(chosenFileEntry, function(writableFileEntry) { + chrome.fileSystem.getWritableEntry(chosenFileEntry, function(writableFileEntry) { writableFileEntry.createWriter(function(writer) { writer.onerror = errorHandler; writer.onwriteend = callback; @@ -215,7 +215,7 @@ using the <code>writer.write()</code> method. </p> <pre> -chrome.fileSystem.chooseFile({type: 'saveFile'}, function(writableFileEntry) { +chrome.fileSystem.chooseEntry({type: 'saveFile'}, function(writableFileEntry) { writableFileEntry.createWriter(function(writer) { writer.onerror = errorHandler; writer.onwriteend = function(e) { |