Index: chrome/common/extensions/api/file_system_provider.idl |
diff --git a/chrome/common/extensions/api/file_system_provider.idl b/chrome/common/extensions/api/file_system_provider.idl |
index 155c7da2d59b6bbaaa9293d75bb44c8c7af5c13d..979a28d6e88ed24eb079599b77f635d84b6ef660 100644 |
--- a/chrome/common/extensions/api/file_system_provider.idl |
+++ b/chrome/common/extensions/api/file_system_provider.idl |
@@ -8,7 +8,7 @@ |
implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h"] |
namespace fileSystemProvider { |
// Error codes used by providing extensions in response to requests. For |
- // success, <code>OK</code> should be used. |
+ // success, <code>OK</code> must be used. |
enum ProviderError { |
OK, |
FAILED, |
@@ -54,129 +54,230 @@ namespace fileSystemProvider { |
// Represents a mounted file system. |
dictionary FileSystemInfo { |
+ // An identifier of the file system. |
benwells
2014/09/03 01:19:38
s/An/The/
mtomasz
2014/09/03 04:01:18
Done.
|
DOMString fileSystemId; |
+ |
+ // 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.
|
DOMString displayName; |
+ |
+ // 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.
|
[nodoc] boolean writable; |
}; |
// Options for the <code>mount()</code> method. |
dictionary MountOptions { |
+ // 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.
|
+ // extension. |
DOMString fileSystemId; |
+ |
+ // 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.
|
DOMString displayName; |
+ |
+ // Whether the file system supports operations which may change contents |
+ // of the file system (such as creating, deleting or writing to files). |
[nodoc] boolean? writable; |
}; |
// Options for the <code>unmount()</code> method. |
dictionary UnmountOptions { |
+ // 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.
|
DOMString fileSystemId; |
}; |
// Options for the <code>onUnmountRequested()</code> event. |
dictionary UnmountRequestedOptions { |
+ // 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.
|
DOMString fileSystemId; |
long requestId; |
}; |
// Options for the <code>onGetMetadataRequested()</code> event. |
dictionary GetMetadataRequestedOptions { |
+ // 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.
|
DOMString fileSystemId; |
+ |
+ // 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
|
long requestId; |
+ |
+ // A path of the entry to fetch metadata about. |
benwells
2014/09/03 01:19:38
s/A/The/
(same for all options dictionaries).
|
DOMString entryPath; |
}; |
// Options for the <code>onReadDirectoryRequested()</code> event. |
dictionary ReadDirectoryRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A path of the directory which contents are requested. |
DOMString directoryPath; |
}; |
// Options for the <code>onOpenFileRequested()</code> event. |
dictionary OpenFileRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // 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.
|
+ // requests. |
long requestId; |
+ |
+ // A path of the file to be opened. |
DOMString filePath; |
+ |
+ // Whether the file will be used for reading or writing. |
OpenFileMode mode; |
}; |
// Options for the <code>onCloseFileRequested()</code> event. |
dictionary CloseFileRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A request ID used to open the file. |
long openRequestId; |
}; |
// Options for the <code>onReadFileRequested()</code> event. |
dictionary ReadFileRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A request ID used to open the file. |
long openRequestId; |
+ |
+ // Position in the file (in bytes) to start reading from. |
double offset; |
+ |
+ // Number of bytes to be returned. |
double length; |
}; |
// Options for the <code>onCreateDirectoryRequested()</code> event. |
dictionary CreateDirectoryRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A path of the directory to be created. |
DOMString directoryPath; |
+ |
+ // Whether the the operation must fail if the directory already exists. |
boolean exclusive; |
+ |
+ // 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.
|
boolean recursive; |
}; |
// Options for the <code>onDeleteEntryRequested()</code> event. |
dictionary DeleteEntryRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A path of the entry to be deleted. |
DOMString entryPath; |
+ |
+ // Whether the operation is recursive (for directories only). |
boolean recursive; |
}; |
// Options for the <code>onCreateFileRequested()</code> event. |
dictionary CreateFileRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A path of the file to be created. |
DOMString filePath; |
}; |
// Options for the <code>onCopyEntryRequested()</code> event. |
dictionary CopyEntryRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A source path of the entry to be copied. |
DOMString sourcePath; |
+ |
+ // A destination path for the copy operation. |
DOMString targetPath; |
}; |
// Options for the <code>onMoveEntryRequested()</code> event. |
dictionary MoveEntryRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A source path of the entry to be moved into a new place. |
DOMString sourcePath; |
+ |
+ // A destination path for the copy operation. |
DOMString targetPath; |
}; |
// Options for the <code>onTruncateRequested()</code> event. |
dictionary TruncateRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A path of the file to be truncated. |
DOMString filePath; |
+ |
+ // Number of bytes to be retained after the operation completes. |
double length; |
}; |
// Options for the <code>onWriteFileRequested()</code> event. |
dictionary WriteFileRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // A request ID used to open the file. |
long openRequestId; |
+ |
+ // Position in the file (in bytes) to start writing the bytes at. |
benwells
2014/09/03 01:19:38
s/at/from/
|
double offset; |
- double length; |
+ |
+ // Buffer of bytes to be written to the file. |
ArrayBuffer data; |
}; |
// Options for the <code>onAbortRequested()</code> event. |
dictionary AbortRequestedOptions { |
+ // An identifier of the file system related to this operation. |
DOMString fileSystemId; |
+ |
+ // Unique identifier of this request. |
long requestId; |
+ |
+ // An ID of the request to be aborted. |
long operationRequestId; |
}; |
@@ -218,7 +319,7 @@ namespace fileSystemProvider { |
// displayName</code>. <code>displayName</code> will be shown in the left |
// panel of Files.app. <code>displayName</code> can contain any characters |
// including '/', but cannot be an empty string. <code>displayName</code> |
- // should be descriptive but doesn't have to be unique. Duplicate display |
+ // must be descriptive but doesn't have to be unique. Duplicate display |
// names are uniquified by adding suffix like "(1)" in the Files app UI. |
// |
// If a file system with the passed <code>fileSystemId</code> is already |
@@ -230,7 +331,7 @@ namespace fileSystemProvider { |
[nocompile] ErrorCallback errorCallback); |
// Unmounts a file system with the given <code>fileSystemId</code>. It |
- // should be called after <code>onUnmountRequested</code> is invoked. Also, |
+ // must be called after <code>onUnmountRequested</code> is invoked. Also, |
// the providing extension can decide to perform unmounting if not requested |
// (eg. in case of lost connection, or a file error). If there is no file |
// system with the requested id, or unmounting fails, then the |
@@ -246,7 +347,7 @@ namespace fileSystemProvider { |
interface Events { |
// Raised when unmounting for the file system with the <code>fileSystemId |
// </code> identifier is requested. In the response, the <code>unmount |
- // </code> API method should be called together with <code>successCallback |
+ // </code> API method must be called together with <code>successCallback |
// </code>. If unmounting is not possible (eg. due to a pending operation), |
// then <code>errorCallback</code> must be called. |
[maxListeners=1] static void onUnmountRequested( |
@@ -255,7 +356,7 @@ namespace fileSystemProvider { |
ProviderErrorCallback errorCallback); |
// Raised when metadata of a file or a directory at <code>entryPath</code> |
- // is requested. The metadata should be returned with the <code> |
+ // is requested. The metadata must be returned with the <code> |
// successCallback</code> call. In case of an error, <code>errorCallback |
// </code> must be called. |
[maxListeners=1] static void onGetMetadataRequested( |
@@ -264,7 +365,7 @@ namespace fileSystemProvider { |
ProviderErrorCallback errorCallback); |
// Raised when contents of a directory at <code>directoryPath</code> are |
- // requested. The results should be returned in chunks by calling the <code> |
+ // requested. The results must be returned in chunks by calling the <code> |
// successCallback</code> several times. In case of an error, <code> |
// errorCallback</code> must be called. |
[maxListeners=1] static void onReadDirectoryRequested( |
@@ -287,7 +388,7 @@ namespace fileSystemProvider { |
ProviderErrorCallback errorCallback); |
// Raised when reading contents of a file opened previously with <code> |
- // openRequestId</code> is requested. The results should be returned in |
+ // openRequestId</code> is requested. The results must be returned in |
// chunks by calling <code>successCallback</code> several times. In case of |
// an error, <code>errorCallback</code> must be called. |
[maxListeners=1] static void onReadFileRequested( |
@@ -350,10 +451,10 @@ namespace fileSystemProvider { |
// Raised when aborting an operation with <code>operationRequestId</code> |
// is requested. The operation executed with <code>operationRequestId</code> |
- // should be immediately stopped and <code>successCallback</code> of this |
+ // must be immediately stopped and <code>successCallback</code> of this |
// abort request executed. If aborting fails, then <code>errorCallback |
// </code> must be called. Note, that callbacks of the aborted operation |
- // should not be called, as they will be ignored. Despite calling <code> |
+ // must not be called, as they will be ignored. Despite calling <code> |
// errorCallback</code>, the request may be forcibly aborted. |
[maxListeners=1, nodoc] static void onAbortRequested( |
AbortRequestedOptions options, |