WebAPI/DeviceStorageAPI2: Difference between revisions

Line 3: Line 3:
== API ==
== API ==


FileSystem portion of the API:
=== FileSystem ===


  partial interface Navigator {
  partial interface Navigator {
Line 42: Line 42:




The proposed API for FileHandle
=== FileHandle ===


  interface FileHandle {
  interface FileHandle {
Line 80: Line 80:
  };
  };


=== DOMRequest ===


DOMRequest API (Same as IDBRequest, but with the IndexedDB-specific parts removed):
Same as IDBRequest, but with the IndexedDB-specific parts removed.


  interface DOMRequest {
  interface DOMRequest {
Line 91: Line 92:
   attribute EventHandler onsuccess;
   attribute EventHandler onsuccess;
   attribute EventHandler onerror;
   attribute EventHandler onerror;
};
=== Read-only FileSystem ===
*If* there's a desire to expose a read-only filesystem in other APIs, it'd look something like this. However this might not at all be needed.
interface ReadOnlyDeviceStorage {
  // Returns the result as a File object
  DOMRequest get(DOMString name);
 
  // The .result property on each success call is set to a File object
  DeviceStorageCursor enumerate(optional DOMString directory)
  // The .result property on each success call is either a
  // { file: File } or { directory: "name" } object
  DeviceStorageCursor enumerateShallow(optional DOMString directory)
  };
  };
Confirmed users
716

edits