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..e492556d3a44fc926f32bd448f473d59200aa70b 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; |
|
benwells
2014/04/30 07:04:34
Maybe this should this be called baseName?
mtomasz
2014/04/30 09:18:24
It follows HTML5 FileEntry specs. It is called the
|
| + |
| + // File size in bytes. |
| + double size; |
|
benwells
2014/04/30 07:04:34
Is this because long isn't big enough?
mtomasz
2014/04/30 09:18:24
Exactly yes. We had this issue in Files app.
|
| + |
| + // 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 |
| @@ -83,6 +101,15 @@ namespace fileSystemProvider { |
| long fileSystemId, |
| ProviderSuccessCallback successCallback, |
| ProviderErrorCallback errorCallback); |
| + |
| + // Raised, when the user requests metadat for a file or a directory at |
|
benwells
2014/04/30 07:04:34
It feels weird to explicitly mention the user here
mtomasz
2014/04/30 09:18:24
Good point. Done.
|
| + // <code>entryPath</code>. In case of an error, <code>errorCallback</code> |
| + // must be called. |
| + [maxListeners=1] static void onGetMetadataRequested( |
| + long fileSystemId, |
| + DOMString entryPath, |
| + MetadataCallback successCallback, |
| + ErrorCallback errorCallback); |
| }; |
| }; |