Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: services/files/directory.mojom

Issue 1013313002: Move services/files/*.mojom -> mojo/services/files/public/interfaces/. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/files/BUILD.gn ('k') | services/files/directory_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/files/directory.mojom
diff --git a/services/files/directory.mojom b/services/files/directory.mojom
deleted file mode 100644
index 8be25dab9a217618310e927d7961f66e882668ab..0000000000000000000000000000000000000000
--- a/services/files/directory.mojom
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module mojo.files;
-
-import "services/files/file.mojom";
-import "services/files/types.mojom";
-
-// This interface provides access to a directory in a "file system", providing
-// operations such as creating/opening/removing/renaming files/directories
-// within it. Note that all relative |path| arguments are relative to "this"
-// directory (i.e., "this" directory functions as the current working directory
-// for the various operations).
-// TODO(vtl): Paths may be relative; should they allowed to be absolute?
-// (Currently not.)
-interface Directory {
- // Operations about "this" |Directory|:
-
- // Reads the contents of this directory.
- // TODO(vtl): Clarify error codes versus |directory_contents|.
- Read() => (Error error, array<DirectoryEntry>? directory_contents);
-
- // Gets information about this directory. On success, |file_information| is
- // non-null and will contain this information.
- Stat() => (Error error, FileInformation? file_information);
-
- // Updates this directory's atime and/or mtime to the time specified by
- // |atime| (or |mtime|, respectively), which may also indicate "now". If
- // |atime| or |mtime| is null, then the corresponding time is not modified.
- Touch(TimespecOrNow? atime, TimespecOrNow? mtime) => (Error error);
-
- // Operations *in* "this" |Directory|:
-
- // Opens the file specified by |path| with the given |open_flags|. |file| is
- // optional, mainly for consistency with |OpenDirectory()| (but may be useful,
- // together with |kOpenFlagCreate|, for "touching" a file).
- OpenFile(string path, File&? file, uint32 open_flags)
- => (Error error);
-
- // Opens the directory specified by |path|. |directory| is optional, so that
- // this may be used as a simple "mkdir()" with |kOpenFlagCreate|.
- OpenDirectory(string path,
- Directory&? directory,
- uint32 open_flags) => (Error error);
-
- // Renames/moves the file/directory given by |path| to |new_path|.
- Rename(string path, string new_path) => (Error error);
-
- // Deletes the given path, which may be a file or a directory (see
- // |kDeleteFlag...| for details).
- Delete(string path, uint32 delete_flags) => (Error error);
-
- // TODO(vtl): directory "streaming"?
- // TODO(vtl): "make root" (i.e., prevent cd-ing, etc., to parent); note that
- // this would require a much more complicated implementation (e.g., it needs
- // to be "inherited" by OpenDirectory(), and the enforcement needs to be valid
- // even if the opened directory is subsequently moved -- e.g., closer to the
- // "root")
- // TODO(vtl): Add a "watch"?
- // TODO(vtl): Should we have a "close" method?
- // TODO(vtl): Add Dup() and Reopen() (like File)?
-};
« no previous file with comments | « services/files/BUILD.gn ('k') | services/files/directory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698