| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.files; | 6 module mojo.files; |
| 7 | 7 |
| 8 import "files/public/interfaces/file.mojom"; | 8 import "files/interfaces/file.mojom"; |
| 9 import "files/public/interfaces/types.mojom"; | 9 import "files/interfaces/types.mojom"; |
| 10 | 10 |
| 11 // This interface provides access to a directory in a "file system", providing | 11 // This interface provides access to a directory in a "file system", providing |
| 12 // operations such as creating/opening/removing/renaming files/directories | 12 // operations such as creating/opening/removing/renaming files/directories |
| 13 // within it. Note that all relative |path| arguments are relative to "this" | 13 // within it. Note that all relative |path| arguments are relative to "this" |
| 14 // directory (i.e., "this" directory functions as the current working directory | 14 // directory (i.e., "this" directory functions as the current working directory |
| 15 // for the various operations). | 15 // for the various operations). |
| 16 // TODO(vtl): Paths may be relative; should they allowed to be absolute? | 16 // TODO(vtl): Paths may be relative; should they allowed to be absolute? |
| 17 // (Currently not.) | 17 // (Currently not.) |
| 18 interface Directory { | 18 interface Directory { |
| 19 // Operations about "this" |Directory|: | 19 // Operations about "this" |Directory|: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // TODO(vtl): directory "streaming"? | 55 // TODO(vtl): directory "streaming"? |
| 56 // TODO(vtl): "make root" (i.e., prevent cd-ing, etc., to parent); note that | 56 // TODO(vtl): "make root" (i.e., prevent cd-ing, etc., to parent); note that |
| 57 // this would require a much more complicated implementation (e.g., it needs | 57 // this would require a much more complicated implementation (e.g., it needs |
| 58 // to be "inherited" by OpenDirectory(), and the enforcement needs to be valid | 58 // to be "inherited" by OpenDirectory(), and the enforcement needs to be valid |
| 59 // even if the opened directory is subsequently moved -- e.g., closer to the | 59 // even if the opened directory is subsequently moved -- e.g., closer to the |
| 60 // "root") | 60 // "root") |
| 61 // TODO(vtl): Add a "watch"? | 61 // TODO(vtl): Add a "watch"? |
| 62 // TODO(vtl): Should we have a "close" method? | 62 // TODO(vtl): Should we have a "close" method? |
| 63 // TODO(vtl): Add Dup() and Reopen() (like File)? | 63 // TODO(vtl): Add Dup() and Reopen() (like File)? |
| 64 }; | 64 }; |
| OLD | NEW |