Chromium Code Reviews| 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 e10cb8c2a02f61973cbaf1db97a5912bf50ea1eb..3194dbd45cf8a6a1d18c57f9e4be59b8a03e9c44 100644 |
| --- a/chrome/common/extensions/api/file_system_provider.idl |
| +++ b/chrome/common/extensions/api/file_system_provider.idl |
| @@ -29,6 +29,21 @@ namespace fileSystemProvider { |
| IO |
| }; |
| + // Represents metadata of a file or a directory. |
| + dictionary EntryMetadata { |
| + // True if it is a directory. |
| + boolean isDirectory; |
| + |
| + // Name of this entry (not full path name). |
| + DOMString name; |
| + |
| + // File size in bytes. |
| + double size; |
| + |
| + // The last modified time of this entry. |
| + [instanceOf=Date] object modificationTime; |
| + }; |
| + |
| // Callback to receive the result of mount() function. |
| // <code>fileSystemID</code> will be a unique ID for the file system just |
| // mounted. The ID is used to distinguish multiple file systems mounted |
| @@ -51,6 +66,9 @@ namespace fileSystemProvider { |
| // Callback to handle an error raised from the browser. |
| [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
| + // Success callback for the <code>onGetMetadataRequested</code> event. |
| + callback MetadataCallback = void(EntryMetadata metadata); |
| + |
| interface Functions { |
| // Mounts a file system with the given <code>displayName</code>. |
| // <code>displayName</code> will be shown in the left panel of |
| @@ -74,15 +92,25 @@ namespace fileSystemProvider { |
| }; |
| interface Events { |
| - // Raised, when the user requests unmounting of the file system with the |
| - // <code>fileSystemId</code> identifier in the Files.app UI. In response, |
| - // the <code>unmount</code> API method should be called. If unmounting is |
| - // not possible (eg. due to pending operation), then <code>errorCallback |
| - // </code> should be called, and <code>unmount</code> should not be called. |
| + // Raised when unmounting for the file system with the <code>fileSystemId |
| + // </code> identifier is requested. In response, the <code>unmount</code> |
| + // API method should 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( |
| long fileSystemId, |
| ProviderSuccessCallback successCallback, |
| ProviderErrorCallback errorCallback); |
| + |
| + // Raised, when metada of a file or a directory at <code>entryPath</code> |
|
benwells
2014/05/01 04:16:25
Nit: metada?
mtomasz
2014/05/01 05:09:07
Oops. Done.
|
| + // is requested. The metadata should be returned with the <code> |
| + // successCallback</code> call. In case of an error, <code>errorCallback |
| + // </code> must be called. |
| + [maxListeners=1] static void onGetMetadataRequested( |
| + long fileSystemId, |
| + DOMString entryPath, |
| + MetadataCallback successCallback, |
| + ErrorCallback errorCallback); |
| }; |
| }; |