Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5177)

Unified Diff: chrome/common/extensions/api/file_system_provider.idl

Issue 258783006: [fsp] Add the getMetadata operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing jsdoc. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/api/file_system_provider_internal.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
};
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/api/file_system_provider_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698