Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 dictionary DeviceStorageEnumerationParameters {
7 Date since;
8 };
10 interface DeviceStorage : EventTarget {
11 attribute EventHandler onchange;
13 [Throws]
14 DOMRequest? add(Blob? aBlob);
15 [Throws]
16 DOMRequest? addNamed(Blob? aBlob, DOMString aName);
18 [Throws]
19 DOMRequest get(DOMString aName);
20 [Throws]
21 DOMRequest getEditable(DOMString aName);
22 [Throws]
23 DOMRequest delete(DOMString aName);
25 [Throws]
26 DOMCursor enumerate(optional DeviceStorageEnumerationParameters options);
27 [Throws]
28 DOMCursor enumerate(DOMString path,
29 optional DeviceStorageEnumerationParameters options);
30 [Throws]
31 DOMCursor enumerateEditable(optional DeviceStorageEnumerationParameters options);
32 [Throws]
33 DOMCursor enumerateEditable(DOMString path,
34 optional DeviceStorageEnumerationParameters options);
36 [Throws]
37 DOMRequest freeSpace();
38 [Throws]
39 DOMRequest usedSpace();
40 [Throws]
41 DOMRequest available();
42 [Throws]
43 DOMRequest storageStatus();
44 [Throws]
45 DOMRequest format();
46 [Throws]
47 DOMRequest mount();
48 [Throws]
49 DOMRequest unmount();
51 // Note that the storageName is just a name (like sdcard), and doesn't
52 // include any path information.
53 readonly attribute DOMString storageName;
55 // Determines if this storage area is the one which will be used by default
56 // for storing new files.
57 readonly attribute boolean default;
59 [NewObject]
60 Promise getRoot();
61 };