OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 /** | |
6 * Represents each volume, such as "drive", "download directory", each "USB | |
7 * flush storage", or "mounted zip archive" etc. | |
8 * @interface | |
9 */ | |
10 function VolumeInfo() {}; | |
11 | |
12 /** @type {VolumeManagerCommon.VolumeType} */ | |
13 VolumeInfo.prototype.volumeType; | |
14 | |
15 /** | |
16 * The ID of the volume. | |
17 * @type {string} | |
18 */ | |
19 VolumeInfo.prototype.volumeId; | |
20 | |
21 /** @type {FileSystem} */ | |
22 VolumeInfo.prototype.fileSystem; | |
23 | |
24 /** | |
25 * Display root path. It is null before finishing to resolve the entry. | |
26 * @type {DirectoryEntry} | |
27 */ | |
28 VolumeInfo.prototype.displayRoot; | |
29 | |
30 /** | |
31 * The volume's fake entries such as Recent, Offline, Shared with me, etc... | |
32 * in Google Drive. | |
33 * @type {Object<!FakeEntry>}} | |
34 */ | |
35 VolumeInfo.prototype.fakeEntries; | |
36 | |
37 /** | |
38 * This represents if the mounting of the volume is successfully done or not. | |
39 * (If error is empty string, the mount is successfully done) | |
40 * @type {(string|undefined)} | |
41 */ | |
42 VolumeInfo.prototype.error; | |
43 | |
44 /** | |
45 * The type of device. (e.g. USB, SD card, DVD etc.) | |
46 * @type {(string|undefined)} | |
47 */ | |
48 VolumeInfo.prototype.deviceType; | |
49 | |
50 /** | |
51 * If the volume is removable, devicePath is the path of the system device this | |
52 * device's block is a part of. (e.g. /sys/devices/pci0000:00/.../8:0:0:0/) | |
53 * Otherwise, this should be empty. | |
54 * @type {(string|undefined)} | |
55 */ | |
56 VolumeInfo.prototype.devicePath; | |
57 | |
58 /** @type {boolean} */ | |
59 VolumeInfo.prototype.isReadOnly; | |
60 | |
61 /** @type {!{displayName:string, isCurrentProfile:boolean}} */ | |
62 VolumeInfo.prototype.profile; | |
63 | |
64 /** | |
65 * Label for the volume if the volume is either removable or a provided file | |
66 * system. In case of removables, if disk is a parent, then its label, else | |
67 * parent's label (e.g. "TransMemory"). | |
68 * @type {string} | |
69 */ | |
70 VolumeInfo.prototype.label; | |
71 | |
72 /** | |
73 * ID of an extennsion providing this volume. | |
74 * @type {(string|undefined)} | |
75 */ | |
76 VolumeInfo.prototype.extensionId; | |
77 | |
78 /** | |
79 * True if the volume contains media. | |
80 * @type {boolean} | |
81 */ | |
82 VolumeInfo.prototype.hasMedia; | |
83 | |
84 /** | |
85 * True if the volume is configurable. | |
86 * See https://developer.chrome.com/apps/fileSystemProvider. | |
87 * @type {boolean} | |
88 */ | |
89 VolumeInfo.prototype.configurable; | |
90 | |
91 /** | |
92 * True if the volume notifies about changes via file/directory watchers. | |
93 * @type {boolean} | |
94 */ | |
95 VolumeInfo.prototype.watchable; | |
96 | |
97 /** | |
98 * | |
oka
2016/08/22 06:51:09
Revert? Or add a comment.
fukino
2016/08/22 08:50:57
Done.
| |
99 * @type {VolumeManagerCommon.Source} | |
100 */ | |
101 VolumeInfo.prototype.source; | |
102 | |
103 /** | |
104 * Starts resolving the display root and obtains it. It may take long time for | |
105 * Drive. Once resolved, it is cached. | |
106 * | |
107 * @param {function(!DirectoryEntry)=} opt_onSuccess Success callback with the | |
108 * display root directory as an argument. | |
109 * @param {function(*)=} opt_onFailure Failure callback. | |
110 * @return {!Promise.<!DirectoryEntry>} | |
111 */ | |
112 VolumeInfo.prototype.resolveDisplayRoot = function( | |
113 opt_onSuccess, opt_onFailure) {}; | |
OLD | NEW |