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

Side by Side Diff: components/filesystem/public/interfaces/directory.mojom

Issue 1935863002: mojo: Fix leveldb unittests by making fs::Directories cloneable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gyp continues to exist. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « components/filesystem/filesystem.gyp ('k') | components/filesystem/shared_temp_dir.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 module filesystem; 5 module filesystem;
6 6
7 import "components/filesystem/public/interfaces/file.mojom"; 7 import "components/filesystem/public/interfaces/file.mojom";
8 import "components/filesystem/public/interfaces/types.mojom"; 8 import "components/filesystem/public/interfaces/types.mojom";
9 9
10 // This interface provides access to a directory in a "file system", providing 10 // This interface provides access to a directory in a "file system", providing
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Opens a file descriptor on this directory and calls 64 // Opens a file descriptor on this directory and calls
65 // fsync()/FlushFileBuffers(). 65 // fsync()/FlushFileBuffers().
66 [Sync] 66 [Sync]
67 Flush() => (FileError error); 67 Flush() => (FileError error);
68 68
69 // Gets information about this file. On success, |file_information| is 69 // Gets information about this file. On success, |file_information| is
70 // non-null and will contain this information. 70 // non-null and will contain this information.
71 [Sync] 71 [Sync]
72 StatFile(string path) => (FileError error, FileInformation? file_information); 72 StatFile(string path) => (FileError error, FileInformation? file_information);
73 73
74 // Creates a copy of this directory.
75 Clone(Directory& directory);
76
74 // Reads the contents of an entire file. 77 // Reads the contents of an entire file.
75 ReadEntireFile(string path) => (FileError error, array<uint8> data); 78 ReadEntireFile(string path) => (FileError error, array<uint8> data);
76 79
77 // Writes |data| to |path|, overwriting the file if it already exists. 80 // Writes |data| to |path|, overwriting the file if it already exists.
78 WriteFile(string path, array<uint8> data) => (FileError error); 81 WriteFile(string path, array<uint8> data) => (FileError error);
79 82
80 // TODO(vtl): directory "streaming"? 83 // TODO(vtl): directory "streaming"?
81 // TODO(vtl): "make root" (i.e., prevent cd-ing, etc., to parent); note that 84 // TODO(vtl): "make root" (i.e., prevent cd-ing, etc., to parent); note that
82 // this would require a much more complicated implementation (e.g., it needs 85 // this would require a much more complicated implementation (e.g., it needs
83 // to be "inherited" by OpenDirectory(), and the enforcement needs to be valid 86 // to be "inherited" by OpenDirectory(), and the enforcement needs to be valid
84 // even if the opened directory is subsequently moved -- e.g., closer to the 87 // even if the opened directory is subsequently moved -- e.g., closer to the
85 // "root") 88 // "root")
86 // TODO(vtl): Add a "watch"? 89 // TODO(vtl): Add a "watch"?
87 }; 90 };
OLDNEW
« no previous file with comments | « components/filesystem/filesystem.gyp ('k') | components/filesystem/shared_temp_dir.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698