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 |
108 // Event notifying about a change in a file or a directory, including its | 113 // Event notifying about a change in a file or a directory, including its |
109 // contents. | 114 // contents. |
110 [nodoc] dictionary EntryChangedEvent { | 115 [nodoc] dictionary EntryChangedEvent { |
111 // Tracked entry. | 116 // Tracked entry. |
112 [instanceOf=Entry] object target; | 117 [instanceOf=Entry] object target; |
113 | 118 |
114 // List of changed entries within the tracked directory in order they | 119 // List of changed entries within the tracked directory in order they |
115 // happened. May not be available for some types of file systems. | 120 // happened. May not be available for some types of file systems. |
116 ChildChange[]? childChanges; | 121 ChildChange[]? childChanges; |
117 }; | 122 }; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 optional boolean recursive); | 215 optional boolean recursive); |
211 | 216 |
212 // Unobserves a previously observed either a file or a directory. | 217 // Unobserves a previously observed either a file or a directory. |
213 [nodoc] static void unobserveEntry([instanceOf=Entry] object entry); | 218 [nodoc] static void unobserveEntry([instanceOf=Entry] object entry); |
214 | 219 |
215 // Lists all observed entries. | 220 // Lists all observed entries. |
216 [nodoc] static void getObservedEntries(GetObservedEntriesCallback callback); | 221 [nodoc] static void getObservedEntries(GetObservedEntriesCallback callback); |
217 }; | 222 }; |
218 | 223 |
219 interface Events { | 224 interface Events { |
| 225 // Called when a list of available volumes is changed. |
| 226 static void onVolumeListChanged(VolumeListChangedEvent event); |
| 227 |
220 // Called when an observed entry is changed. | 228 // Called when an observed entry is changed. |
221 [nodoc] static void onEntryChanged(EntryChangedEvent event); | 229 [nodoc] static void onEntryChanged(EntryChangedEvent event); |
222 | 230 |
223 // Called when an observed entry is removed. | 231 // Called when an observed entry is removed. |
224 [nodoc] static void onEntryRemoved(EntryRemovedEvent event); | 232 [nodoc] static void onEntryRemoved(EntryRemovedEvent event); |
225 }; | 233 }; |
226 }; | 234 }; |
OLD | NEW |