Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, | 5 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, |
| 6 // that can be accessible from the file manager on Chrome OS. | 6 // that can be accessible from the file manager on Chrome OS. |
| 7 [platforms=("chromeos"), | 7 [platforms=("chromeos"), |
| 8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy stem_provider_api.h"] | 8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy stem_provider_api.h"] |
| 9 namespace fileSystemProvider { | 9 namespace fileSystemProvider { |
| 10 // Error codes used by providing extensions in response to requests. For | 10 // Error codes used by providing extensions in response to requests. For |
| 11 // success, <code>OK</code> should be used. | 11 // success, <code>OK</code> must be used. |
| 12 enum ProviderError { | 12 enum ProviderError { |
| 13 OK, | 13 OK, |
| 14 FAILED, | 14 FAILED, |
| 15 IN_USE, | 15 IN_USE, |
| 16 EXISTS, | 16 EXISTS, |
| 17 NOT_FOUND, | 17 NOT_FOUND, |
| 18 ACCESS_DENIED, | 18 ACCESS_DENIED, |
| 19 TOO_MANY_OPENED, | 19 TOO_MANY_OPENED, |
| 20 NO_MEMORY, | 20 NO_MEMORY, |
| 21 NO_SPACE, | 21 NO_SPACE, |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // Represents metadata of a file or a directory. | 37 // Represents metadata of a file or a directory. |
| 38 dictionary EntryMetadata { | 38 dictionary EntryMetadata { |
| 39 // True if it is a directory. | 39 // True if it is a directory. |
| 40 boolean isDirectory; | 40 boolean isDirectory; |
| 41 | 41 |
| 42 // Name of this entry (not full path name). | 42 // Name of this entry (not full path name). |
| 43 DOMString name; | 43 DOMString name; |
| 44 | 44 |
| 45 // File size in bytes. | 45 // File size in bytes. |
|
mtomasz
2014/09/03 04:01:18
Should it be "The file size in bytes"?
| |
| 46 double size; | 46 double size; |
| 47 | 47 |
| 48 // The last modified time of this entry. | 48 // The last modified time of this entry. |
| 49 [instanceOf=Date] object modificationTime; | 49 [instanceOf=Date] object modificationTime; |
| 50 | 50 |
| 51 // Mime type for the entry. | 51 // Mime type for the entry. |
| 52 DOMString? mimeType; | 52 DOMString? mimeType; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Represents a mounted file system. | 55 // Represents a mounted file system. |
| 56 dictionary FileSystemInfo { | 56 dictionary FileSystemInfo { |
| 57 DOMString fileSystemId; | 57 // An identifier of the file system. |
|
benwells
2014/09/03 01:19:38
s/An/The/
mtomasz
2014/09/03 04:01:18
Done.
| |
| 58 DOMString fileSystemId; | |
| 59 | |
| 60 // A human-readable name of the file system. | |
|
benwells
2014/09/03 01:19:38
s/of/for/
mtomasz
2014/09/03 04:01:18
Should it be "The human-readable name..."?
mtomasz
2014/09/03 04:01:19
Done.
| |
| 58 DOMString displayName; | 61 DOMString displayName; |
| 62 | |
| 63 // Whether the file system supports contents changing operations. | |
|
benwells
2014/09/03 01:19:37
This isn't a very typical way of describing this.
mtomasz
2014/09/03 04:01:18
Done.
| |
| 59 [nodoc] boolean writable; | 64 [nodoc] boolean writable; |
| 60 }; | 65 }; |
| 61 | 66 |
| 62 // Options for the <code>mount()</code> method. | 67 // Options for the <code>mount()</code> method. |
| 63 dictionary MountOptions { | 68 dictionary MountOptions { |
| 64 DOMString fileSystemId; | 69 // A string indentifier of the file system. Must be unique per each |
|
benwells
2014/09/03 01:19:38
s/A/The/
mtomasz
2014/09/03 04:01:18
Done.
| |
| 70 // extension. | |
| 71 DOMString fileSystemId; | |
| 72 | |
| 73 // A human-readable name of the file system. | |
|
benwells
2014/09/03 01:19:38
s/of/for/
mtomasz
2014/09/03 04:01:18
Done.
| |
| 65 DOMString displayName; | 74 DOMString displayName; |
| 75 | |
| 76 // Whether the file system supports operations which may change contents | |
| 77 // of the file system (such as creating, deleting or writing to files). | |
| 66 [nodoc] boolean? writable; | 78 [nodoc] boolean? writable; |
| 67 }; | 79 }; |
| 68 | 80 |
| 69 // Options for the <code>unmount()</code> method. | 81 // Options for the <code>unmount()</code> method. |
| 70 dictionary UnmountOptions { | 82 dictionary UnmountOptions { |
| 83 // An identifier of the file system to be unmounted. | |
|
benwells
2014/09/03 01:19:38
s/An/The/
mtomasz
2014/09/03 04:01:18
Done.
| |
| 71 DOMString fileSystemId; | 84 DOMString fileSystemId; |
| 72 }; | 85 }; |
| 73 | 86 |
| 74 // Options for the <code>onUnmountRequested()</code> event. | 87 // Options for the <code>onUnmountRequested()</code> event. |
| 75 dictionary UnmountRequestedOptions { | 88 dictionary UnmountRequestedOptions { |
| 89 // An identifier of the file system to be unmounted. | |
|
benwells
2014/09/03 01:19:38
s/An/The/
mtomasz
2014/09/03 04:01:18
Done.
| |
| 76 DOMString fileSystemId; | 90 DOMString fileSystemId; |
| 77 long requestId; | 91 long requestId; |
| 78 }; | 92 }; |
| 79 | 93 |
| 80 // Options for the <code>onGetMetadataRequested()</code> event. | 94 // Options for the <code>onGetMetadataRequested()</code> event. |
| 81 dictionary GetMetadataRequestedOptions { | 95 dictionary GetMetadataRequestedOptions { |
| 82 DOMString fileSystemId; | 96 // An identifier of the file system related to this operation. |
|
benwells
2014/09/03 01:19:38
s/An/The/
(same for all options dictionaries).
mtomasz
2014/09/03 04:01:19
Done.
| |
| 83 long requestId; | 97 DOMString fileSystemId; |
| 98 | |
| 99 // Unique identifier of this request. | |
|
benwells
2014/09/03 01:19:38
The unique...
(same for all options dictionaries)
mtomasz
2014/09/03 04:01:18
On 2014/09/03 01:19:38, benwells wrote:
> The uniq
| |
| 100 long requestId; | |
| 101 | |
| 102 // A path of the entry to fetch metadata about. | |
|
benwells
2014/09/03 01:19:38
s/A/The/
(same for all options dictionaries).
| |
| 84 DOMString entryPath; | 103 DOMString entryPath; |
| 85 }; | 104 }; |
| 86 | 105 |
| 87 // Options for the <code>onReadDirectoryRequested()</code> event. | 106 // Options for the <code>onReadDirectoryRequested()</code> event. |
| 88 dictionary ReadDirectoryRequestedOptions { | 107 dictionary ReadDirectoryRequestedOptions { |
| 89 DOMString fileSystemId; | 108 // An identifier of the file system related to this operation. |
| 90 long requestId; | 109 DOMString fileSystemId; |
| 110 | |
| 111 // Unique identifier of this request. | |
| 112 long requestId; | |
| 113 | |
| 114 // A path of the directory which contents are requested. | |
| 91 DOMString directoryPath; | 115 DOMString directoryPath; |
| 92 }; | 116 }; |
| 93 | 117 |
| 94 // Options for the <code>onOpenFileRequested()</code> event. | 118 // Options for the <code>onOpenFileRequested()</code> event. |
| 95 dictionary OpenFileRequestedOptions { | 119 dictionary OpenFileRequestedOptions { |
| 96 DOMString fileSystemId; | 120 // An identifier of the file system related to this operation. |
| 97 long requestId; | 121 DOMString fileSystemId; |
| 122 | |
| 123 // A request ID which will be used by consecutive read/write and close | |
|
mtomasz
2014/09/03 04:01:18
Shall it be "The request ID"? WDYT?
benwells
2014/09/03 05:22:16
I think this one is OK as is.
| |
| 124 // requests. | |
| 125 long requestId; | |
| 126 | |
| 127 // A path of the file to be opened. | |
| 98 DOMString filePath; | 128 DOMString filePath; |
| 129 | |
| 130 // Whether the file will be used for reading or writing. | |
| 99 OpenFileMode mode; | 131 OpenFileMode mode; |
| 100 }; | 132 }; |
| 101 | 133 |
| 102 // Options for the <code>onCloseFileRequested()</code> event. | 134 // Options for the <code>onCloseFileRequested()</code> event. |
| 103 dictionary CloseFileRequestedOptions { | 135 dictionary CloseFileRequestedOptions { |
| 104 DOMString fileSystemId; | 136 // An identifier of the file system related to this operation. |
| 105 long requestId; | 137 DOMString fileSystemId; |
| 138 | |
| 139 // Unique identifier of this request. | |
| 140 long requestId; | |
| 141 | |
| 142 // A request ID used to open the file. | |
| 106 long openRequestId; | 143 long openRequestId; |
| 107 }; | 144 }; |
| 108 | 145 |
| 109 // Options for the <code>onReadFileRequested()</code> event. | 146 // Options for the <code>onReadFileRequested()</code> event. |
| 110 dictionary ReadFileRequestedOptions { | 147 dictionary ReadFileRequestedOptions { |
| 111 DOMString fileSystemId; | 148 // An identifier of the file system related to this operation. |
| 112 long requestId; | 149 DOMString fileSystemId; |
| 150 | |
| 151 // Unique identifier of this request. | |
| 152 long requestId; | |
| 153 | |
| 154 // A request ID used to open the file. | |
| 113 long openRequestId; | 155 long openRequestId; |
| 156 | |
| 157 // Position in the file (in bytes) to start reading from. | |
| 114 double offset; | 158 double offset; |
| 159 | |
| 160 // Number of bytes to be returned. | |
| 115 double length; | 161 double length; |
| 116 }; | 162 }; |
| 117 | 163 |
| 118 // Options for the <code>onCreateDirectoryRequested()</code> event. | 164 // Options for the <code>onCreateDirectoryRequested()</code> event. |
| 119 dictionary CreateDirectoryRequestedOptions { | 165 dictionary CreateDirectoryRequestedOptions { |
| 120 DOMString fileSystemId; | 166 // An identifier of the file system related to this operation. |
| 121 long requestId; | 167 DOMString fileSystemId; |
| 168 | |
| 169 // Unique identifier of this request. | |
| 170 long requestId; | |
| 171 | |
| 172 // A path of the directory to be created. | |
| 122 DOMString directoryPath; | 173 DOMString directoryPath; |
| 174 | |
| 175 // Whether the the operation must fail if the directory already exists. | |
| 123 boolean exclusive; | 176 boolean exclusive; |
| 177 | |
| 178 // Whether the operation is recursive (for directories only). | |
|
benwells
2014/09/03 01:19:38
I'm unclear what this means for create directory.
mtomasz
2014/09/03 04:01:18
Yes. More information is in the comment for onCrea
benwells
2014/09/03 05:22:16
OK, no problem.
| |
| 124 boolean recursive; | 179 boolean recursive; |
| 125 }; | 180 }; |
| 126 | 181 |
| 127 // Options for the <code>onDeleteEntryRequested()</code> event. | 182 // Options for the <code>onDeleteEntryRequested()</code> event. |
| 128 dictionary DeleteEntryRequestedOptions { | 183 dictionary DeleteEntryRequestedOptions { |
| 129 DOMString fileSystemId; | 184 // An identifier of the file system related to this operation. |
| 130 long requestId; | 185 DOMString fileSystemId; |
| 186 | |
| 187 // Unique identifier of this request. | |
| 188 long requestId; | |
| 189 | |
| 190 // A path of the entry to be deleted. | |
| 131 DOMString entryPath; | 191 DOMString entryPath; |
| 192 | |
| 193 // Whether the operation is recursive (for directories only). | |
| 132 boolean recursive; | 194 boolean recursive; |
| 133 }; | 195 }; |
| 134 | 196 |
| 135 // Options for the <code>onCreateFileRequested()</code> event. | 197 // Options for the <code>onCreateFileRequested()</code> event. |
| 136 dictionary CreateFileRequestedOptions { | 198 dictionary CreateFileRequestedOptions { |
| 137 DOMString fileSystemId; | 199 // An identifier of the file system related to this operation. |
| 138 long requestId; | 200 DOMString fileSystemId; |
| 201 | |
| 202 // Unique identifier of this request. | |
| 203 long requestId; | |
| 204 | |
| 205 // A path of the file to be created. | |
| 139 DOMString filePath; | 206 DOMString filePath; |
| 140 }; | 207 }; |
| 141 | 208 |
| 142 // Options for the <code>onCopyEntryRequested()</code> event. | 209 // Options for the <code>onCopyEntryRequested()</code> event. |
| 143 dictionary CopyEntryRequestedOptions { | 210 dictionary CopyEntryRequestedOptions { |
| 144 DOMString fileSystemId; | 211 // An identifier of the file system related to this operation. |
| 145 long requestId; | 212 DOMString fileSystemId; |
| 213 | |
| 214 // Unique identifier of this request. | |
| 215 long requestId; | |
| 216 | |
| 217 // A source path of the entry to be copied. | |
| 146 DOMString sourcePath; | 218 DOMString sourcePath; |
| 219 | |
| 220 // A destination path for the copy operation. | |
| 147 DOMString targetPath; | 221 DOMString targetPath; |
| 148 }; | 222 }; |
| 149 | 223 |
| 150 // Options for the <code>onMoveEntryRequested()</code> event. | 224 // Options for the <code>onMoveEntryRequested()</code> event. |
| 151 dictionary MoveEntryRequestedOptions { | 225 dictionary MoveEntryRequestedOptions { |
| 152 DOMString fileSystemId; | 226 // An identifier of the file system related to this operation. |
| 153 long requestId; | 227 DOMString fileSystemId; |
| 228 | |
| 229 // Unique identifier of this request. | |
| 230 long requestId; | |
| 231 | |
| 232 // A source path of the entry to be moved into a new place. | |
| 154 DOMString sourcePath; | 233 DOMString sourcePath; |
| 234 | |
| 235 // A destination path for the copy operation. | |
| 155 DOMString targetPath; | 236 DOMString targetPath; |
| 156 }; | 237 }; |
| 157 | 238 |
| 158 // Options for the <code>onTruncateRequested()</code> event. | 239 // Options for the <code>onTruncateRequested()</code> event. |
| 159 dictionary TruncateRequestedOptions { | 240 dictionary TruncateRequestedOptions { |
| 160 DOMString fileSystemId; | 241 // An identifier of the file system related to this operation. |
| 161 long requestId; | 242 DOMString fileSystemId; |
| 243 | |
| 244 // Unique identifier of this request. | |
| 245 long requestId; | |
| 246 | |
| 247 // A path of the file to be truncated. | |
| 162 DOMString filePath; | 248 DOMString filePath; |
| 249 | |
| 250 // Number of bytes to be retained after the operation completes. | |
| 163 double length; | 251 double length; |
| 164 }; | 252 }; |
| 165 | 253 |
| 166 // Options for the <code>onWriteFileRequested()</code> event. | 254 // Options for the <code>onWriteFileRequested()</code> event. |
| 167 dictionary WriteFileRequestedOptions { | 255 dictionary WriteFileRequestedOptions { |
| 168 DOMString fileSystemId; | 256 // An identifier of the file system related to this operation. |
| 169 long requestId; | 257 DOMString fileSystemId; |
| 258 | |
| 259 // Unique identifier of this request. | |
| 260 long requestId; | |
| 261 | |
| 262 // A request ID used to open the file. | |
| 170 long openRequestId; | 263 long openRequestId; |
| 264 | |
| 265 // Position in the file (in bytes) to start writing the bytes at. | |
|
benwells
2014/09/03 01:19:38
s/at/from/
| |
| 171 double offset; | 266 double offset; |
| 172 double length; | 267 |
| 268 // Buffer of bytes to be written to the file. | |
| 173 ArrayBuffer data; | 269 ArrayBuffer data; |
| 174 }; | 270 }; |
| 175 | 271 |
| 176 // Options for the <code>onAbortRequested()</code> event. | 272 // Options for the <code>onAbortRequested()</code> event. |
| 177 dictionary AbortRequestedOptions { | 273 dictionary AbortRequestedOptions { |
| 178 DOMString fileSystemId; | 274 // An identifier of the file system related to this operation. |
| 179 long requestId; | 275 DOMString fileSystemId; |
| 276 | |
| 277 // Unique identifier of this request. | |
| 278 long requestId; | |
| 279 | |
| 280 // An ID of the request to be aborted. | |
| 180 long operationRequestId; | 281 long operationRequestId; |
| 181 }; | 282 }; |
| 182 | 283 |
| 183 // Callback to receive the result of mount() function. | 284 // Callback to receive the result of mount() function. |
| 184 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); | 285 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); |
| 185 | 286 |
| 186 // Callback to receive the result of unmount() function. | 287 // Callback to receive the result of unmount() function. |
| 187 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 288 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
| 188 | 289 |
| 189 // Callback to receive the result of getAll() function. | 290 // Callback to receive the result of getAll() function. |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 211 // data will be returned, then <code>hasMore</code> must be true, and it | 312 // data will be returned, then <code>hasMore</code> must be true, and it |
| 212 // has to be called again with additional entries. If no more data is | 313 // has to be called again with additional entries. If no more data is |
| 213 // available, then <code>hasMore</code> must be set to false. | 314 // available, then <code>hasMore</code> must be set to false. |
| 214 callback FileDataCallback = void(ArrayBuffer data, boolean hasMore); | 315 callback FileDataCallback = void(ArrayBuffer data, boolean hasMore); |
| 215 | 316 |
| 216 interface Functions { | 317 interface Functions { |
| 217 // Mounts a file system with the given <code>fileSystemId</code> and <code> | 318 // Mounts a file system with the given <code>fileSystemId</code> and <code> |
| 218 // displayName</code>. <code>displayName</code> will be shown in the left | 319 // displayName</code>. <code>displayName</code> will be shown in the left |
| 219 // panel of Files.app. <code>displayName</code> can contain any characters | 320 // panel of Files.app. <code>displayName</code> can contain any characters |
| 220 // including '/', but cannot be an empty string. <code>displayName</code> | 321 // including '/', but cannot be an empty string. <code>displayName</code> |
| 221 // should be descriptive but doesn't have to be unique. Duplicate display | 322 // must be descriptive but doesn't have to be unique. Duplicate display |
| 222 // names are uniquified by adding suffix like "(1)" in the Files app UI. | 323 // names are uniquified by adding suffix like "(1)" in the Files app UI. |
| 223 // | 324 // |
| 224 // If a file system with the passed <code>fileSystemId</code> is already | 325 // If a file system with the passed <code>fileSystemId</code> is already |
| 225 // mounted by this extension, then <code>errorCallback</code> will be called | 326 // mounted by this extension, then <code>errorCallback</code> will be called |
| 226 // with <code>ProviderError.EXISTS</code> value. The <code>fileSystemId | 327 // with <code>ProviderError.EXISTS</code> value. The <code>fileSystemId |
| 227 // </code> must not be an empty string. | 328 // </code> must not be an empty string. |
| 228 static void mount(MountOptions options, | 329 static void mount(MountOptions options, |
| 229 MountCallback successCallback, | 330 MountCallback successCallback, |
| 230 [nocompile] ErrorCallback errorCallback); | 331 [nocompile] ErrorCallback errorCallback); |
| 231 | 332 |
| 232 // Unmounts a file system with the given <code>fileSystemId</code>. It | 333 // Unmounts a file system with the given <code>fileSystemId</code>. It |
| 233 // should be called after <code>onUnmountRequested</code> is invoked. Also, | 334 // must be called after <code>onUnmountRequested</code> is invoked. Also, |
| 234 // the providing extension can decide to perform unmounting if not requested | 335 // the providing extension can decide to perform unmounting if not requested |
| 235 // (eg. in case of lost connection, or a file error). If there is no file | 336 // (eg. in case of lost connection, or a file error). If there is no file |
| 236 // system with the requested id, or unmounting fails, then the | 337 // system with the requested id, or unmounting fails, then the |
| 237 // <code>errorCallback</code> will be called. | 338 // <code>errorCallback</code> will be called. |
| 238 static void unmount(UnmountOptions options, | 339 static void unmount(UnmountOptions options, |
| 239 UnmountCallback successCallback, | 340 UnmountCallback successCallback, |
| 240 [nocompile] ErrorCallback errorCallback); | 341 [nocompile] ErrorCallback errorCallback); |
| 241 | 342 |
| 242 // Returns all file systems mounted by the extension. | 343 // Returns all file systems mounted by the extension. |
| 243 static void getAll(GetAllCallback callback); | 344 static void getAll(GetAllCallback callback); |
| 244 }; | 345 }; |
| 245 | 346 |
| 246 interface Events { | 347 interface Events { |
| 247 // Raised when unmounting for the file system with the <code>fileSystemId | 348 // Raised when unmounting for the file system with the <code>fileSystemId |
| 248 // </code> identifier is requested. In the response, the <code>unmount | 349 // </code> identifier is requested. In the response, the <code>unmount |
| 249 // </code> API method should be called together with <code>successCallback | 350 // </code> API method must be called together with <code>successCallback |
| 250 // </code>. If unmounting is not possible (eg. due to a pending operation), | 351 // </code>. If unmounting is not possible (eg. due to a pending operation), |
| 251 // then <code>errorCallback</code> must be called. | 352 // then <code>errorCallback</code> must be called. |
| 252 [maxListeners=1] static void onUnmountRequested( | 353 [maxListeners=1] static void onUnmountRequested( |
| 253 UnmountRequestedOptions options, | 354 UnmountRequestedOptions options, |
| 254 ProviderSuccessCallback successCallback, | 355 ProviderSuccessCallback successCallback, |
| 255 ProviderErrorCallback errorCallback); | 356 ProviderErrorCallback errorCallback); |
| 256 | 357 |
| 257 // Raised when metadata of a file or a directory at <code>entryPath</code> | 358 // Raised when metadata of a file or a directory at <code>entryPath</code> |
| 258 // is requested. The metadata should be returned with the <code> | 359 // is requested. The metadata must be returned with the <code> |
| 259 // successCallback</code> call. In case of an error, <code>errorCallback | 360 // successCallback</code> call. In case of an error, <code>errorCallback |
| 260 // </code> must be called. | 361 // </code> must be called. |
| 261 [maxListeners=1] static void onGetMetadataRequested( | 362 [maxListeners=1] static void onGetMetadataRequested( |
| 262 GetMetadataRequestedOptions options, | 363 GetMetadataRequestedOptions options, |
| 263 MetadataCallback successCallback, | 364 MetadataCallback successCallback, |
| 264 ProviderErrorCallback errorCallback); | 365 ProviderErrorCallback errorCallback); |
| 265 | 366 |
| 266 // Raised when contents of a directory at <code>directoryPath</code> are | 367 // Raised when contents of a directory at <code>directoryPath</code> are |
| 267 // requested. The results should be returned in chunks by calling the <code> | 368 // requested. The results must be returned in chunks by calling the <code> |
| 268 // successCallback</code> several times. In case of an error, <code> | 369 // successCallback</code> several times. In case of an error, <code> |
| 269 // errorCallback</code> must be called. | 370 // errorCallback</code> must be called. |
| 270 [maxListeners=1] static void onReadDirectoryRequested( | 371 [maxListeners=1] static void onReadDirectoryRequested( |
| 271 ReadDirectoryRequestedOptions options, | 372 ReadDirectoryRequestedOptions options, |
| 272 EntriesCallback successCallback, | 373 EntriesCallback successCallback, |
| 273 ProviderErrorCallback errorCallback); | 374 ProviderErrorCallback errorCallback); |
| 274 | 375 |
| 275 // Raised when opening a file at <code>filePath</code> is requested. If the | 376 // Raised when opening a file at <code>filePath</code> is requested. If the |
| 276 // file does not exist, then the operation must fail. | 377 // file does not exist, then the operation must fail. |
| 277 [maxListeners=1] static void onOpenFileRequested( | 378 [maxListeners=1] static void onOpenFileRequested( |
| 278 OpenFileRequestedOptions options, | 379 OpenFileRequestedOptions options, |
| 279 ProviderSuccessCallback successCallback, | 380 ProviderSuccessCallback successCallback, |
| 280 ProviderErrorCallback errorCallback); | 381 ProviderErrorCallback errorCallback); |
| 281 | 382 |
| 282 // Raised when opening a file previously opened with <code>openRequestId | 383 // Raised when opening a file previously opened with <code>openRequestId |
| 283 // </code> is requested to be closed. | 384 // </code> is requested to be closed. |
| 284 [maxListeners=1] static void onCloseFileRequested( | 385 [maxListeners=1] static void onCloseFileRequested( |
| 285 CloseFileRequestedOptions options, | 386 CloseFileRequestedOptions options, |
| 286 ProviderSuccessCallback successCallback, | 387 ProviderSuccessCallback successCallback, |
| 287 ProviderErrorCallback errorCallback); | 388 ProviderErrorCallback errorCallback); |
| 288 | 389 |
| 289 // Raised when reading contents of a file opened previously with <code> | 390 // Raised when reading contents of a file opened previously with <code> |
| 290 // openRequestId</code> is requested. The results should be returned in | 391 // openRequestId</code> is requested. The results must be returned in |
| 291 // chunks by calling <code>successCallback</code> several times. In case of | 392 // chunks by calling <code>successCallback</code> several times. In case of |
| 292 // an error, <code>errorCallback</code> must be called. | 393 // an error, <code>errorCallback</code> must be called. |
| 293 [maxListeners=1] static void onReadFileRequested( | 394 [maxListeners=1] static void onReadFileRequested( |
| 294 ReadFileRequestedOptions options, | 395 ReadFileRequestedOptions options, |
| 295 FileDataCallback successCallback, | 396 FileDataCallback successCallback, |
| 296 ProviderErrorCallback errorCallback); | 397 ProviderErrorCallback errorCallback); |
| 297 | 398 |
| 298 // Raised when creating a directory is requested. If <code>exclusive</code> | 399 // Raised when creating a directory is requested. If <code>exclusive</code> |
| 299 // is set to true, then the operation must fail if the target directory | 400 // is set to true, then the operation must fail if the target directory |
| 300 // already exists. If <code>recursive</code> is true, then all of the | 401 // already exists. If <code>recursive</code> is true, then all of the |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 | 444 |
| 344 // Raised when writing contents to a file opened previously with <code> | 445 // Raised when writing contents to a file opened previously with <code> |
| 345 // openRequestId</code> is requested. | 446 // openRequestId</code> is requested. |
| 346 [maxListeners=1, nodoc] static void onWriteFileRequested( | 447 [maxListeners=1, nodoc] static void onWriteFileRequested( |
| 347 WriteFileRequestedOptions options, | 448 WriteFileRequestedOptions options, |
| 348 ProviderSuccessCallback successCallback, | 449 ProviderSuccessCallback successCallback, |
| 349 ProviderErrorCallback errorCallback); | 450 ProviderErrorCallback errorCallback); |
| 350 | 451 |
| 351 // Raised when aborting an operation with <code>operationRequestId</code> | 452 // Raised when aborting an operation with <code>operationRequestId</code> |
| 352 // is requested. The operation executed with <code>operationRequestId</code> | 453 // is requested. The operation executed with <code>operationRequestId</code> |
| 353 // should be immediately stopped and <code>successCallback</code> of this | 454 // must be immediately stopped and <code>successCallback</code> of this |
| 354 // abort request executed. If aborting fails, then <code>errorCallback | 455 // abort request executed. If aborting fails, then <code>errorCallback |
| 355 // </code> must be called. Note, that callbacks of the aborted operation | 456 // </code> must be called. Note, that callbacks of the aborted operation |
| 356 // should not be called, as they will be ignored. Despite calling <code> | 457 // must not be called, as they will be ignored. Despite calling <code> |
| 357 // errorCallback</code>, the request may be forcibly aborted. | 458 // errorCallback</code>, the request may be forcibly aborted. |
| 358 [maxListeners=1, nodoc] static void onAbortRequested( | 459 [maxListeners=1, nodoc] static void onAbortRequested( |
| 359 AbortRequestedOptions options, | 460 AbortRequestedOptions options, |
| 360 ProviderSuccessCallback successCallback, | 461 ProviderSuccessCallback successCallback, |
| 361 ProviderErrorCallback errorCallback); | 462 ProviderErrorCallback errorCallback); |
| 362 }; | 463 }; |
| 363 }; | 464 }; |
| 364 | 465 |
| OLD | NEW |