OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 // [platforms=("chromeos")] |
| 6 namespace fileSystemProvider { |
| 7 // TODO(satorux): Switch to DOMError once crbug.com/313131 is fixed. |
| 8 // http://www.w3.org/TR/file-system-api/#errors-and-exceptions |
| 9 dictionary Error { |
| 10 // On success, the value is "OK". On error, one of names described at the |
| 11 // following URL is set. |
| 12 // http://www.w3.org/TR/file-system-api/#errors-and-exceptions |
| 13 DOMString name; |
| 14 }; |
| 15 |
| 16 // Callback to receive the result of mount() function. <code>error</code> |
| 17 // indicates if the request was successful or not. See <code>Error</code> |
| 18 // for details. |
| 19 // |
| 20 // On success, <code>fileSystemID</code> will be a unique ID for the file |
| 21 // system just mounted. <code>fileSystemID</code> is undefined on error. |
| 22 // The ID is used to distinguish multiple file systems mounted from a |
| 23 // single File System Provider. |
| 24 callback MountCallback = void(Error error, |
| 25 DOMString fileSystemId); |
| 26 |
| 27 interface Functions { |
| 28 // Mounts a file system with the given |
| 29 // <code>displayName</code>. <code>displayName</code> will be shown in |
| 30 // the left panel of Files.app. <code>displayName</code> can contain any |
| 31 // characters including '/'. <code>displayName</code> should be |
| 32 // descritive but doesn't have to be unique. Duplicate display names are |
| 33 // uniquified by adding suffix like "(1)" in the Files.app UI. An empty |
| 34 // display name is not allowed. |
| 35 static void mount(DOMString displayName, |
| 36 MountCallback callback); |
| 37 }; |
| 38 }; |
OLD | NEW |