OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use the <code>chrome.fileSystem</code> API to create, read, navigate, | 5 // Use the <code>chrome.fileSystem</code> API to create, read, navigate, |
6 // and write to the user's local file system. With this API, Chrome Apps can | 6 // and write to the user's local file system. With this API, Chrome Apps can |
7 // read and write to a user-selected location. For example, a text editor app | 7 // read and write to a user-selected location. For example, a text editor app |
8 // can use the API to read and write local documents. All failures are notified | 8 // can use the API to read and write local documents. All failures are notified |
9 // via chrome.runtime.lastError. | 9 // via chrome.runtime.lastError. |
10 namespace fileSystem { | 10 namespace fileSystem { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 DOMString volumeId; | 98 DOMString volumeId; |
99 boolean writable; | 99 boolean writable; |
100 }; | 100 }; |
101 | 101 |
102 // Change to an entry within a tracked directory. | 102 // Change to an entry within a tracked directory. |
103 [nodoc] dictionary ChildChange { | 103 [nodoc] dictionary ChildChange { |
104 [instanceOf=Entry] object entry; | 104 [instanceOf=Entry] object entry; |
105 ChildChangeType type; | 105 ChildChangeType type; |
106 }; | 106 }; |
107 | 107 |
108 // Event notifying about an inserted or a removed volume from the system. | |
109 dictionary VolumeListChangedEvent { | |
110 Volume[] volumes; | |
111 }; | |
112 | |
113 // Event notifying about a change in a file or a directory, including its | 108 // Event notifying about a change in a file or a directory, including its |
114 // contents. | 109 // contents. |
115 [nodoc] dictionary EntryChangedEvent { | 110 [nodoc] dictionary EntryChangedEvent { |
116 // Tracked entry. | 111 // Tracked entry. |
117 [instanceOf=Entry] object target; | 112 [instanceOf=Entry] object target; |
118 | 113 |
119 // List of changed entries within the tracked directory in order they | 114 // List of changed entries within the tracked directory in order they |
120 // happened. May not be available for some types of file systems. | 115 // happened. May not be available for some types of file systems. |
121 ChildChange[]? childChanges; | 116 ChildChange[]? childChanges; |
122 }; | 117 }; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 optional boolean recursive); | 210 optional boolean recursive); |
216 | 211 |
217 // Unobserves a previously observed either a file or a directory. | 212 // Unobserves a previously observed either a file or a directory. |
218 [nodoc] static void unobserveEntry([instanceOf=Entry] object entry); | 213 [nodoc] static void unobserveEntry([instanceOf=Entry] object entry); |
219 | 214 |
220 // Lists all observed entries. | 215 // Lists all observed entries. |
221 [nodoc] static void getObservedEntries(GetObservedEntriesCallback callback); | 216 [nodoc] static void getObservedEntries(GetObservedEntriesCallback callback); |
222 }; | 217 }; |
223 | 218 |
224 interface Events { | 219 interface Events { |
225 // Called when a list of available volumes is changed. | |
226 static void onVolumeListChanged(VolumeListChangedEvent event); | |
227 | |
228 // Called when an observed entry is changed. | 220 // Called when an observed entry is changed. |
229 [nodoc] static void onEntryChanged(EntryChangedEvent event); | 221 [nodoc] static void onEntryChanged(EntryChangedEvent event); |
230 | 222 |
231 // Called when an observed entry is removed. | 223 // Called when an observed entry is removed. |
232 [nodoc] static void onEntryRemoved(EntryRemovedEvent event); | 224 [nodoc] static void onEntryRemoved(EntryRemovedEvent event); |
233 }; | 225 }; |
234 }; | 226 }; |
OLD | NEW |