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

Unified Diff: components/filesystem/public/interfaces/directory.mojom

Issue 1646673002: mojo filesystem: Simplify full file reading/writing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Take 2 at trying to fix compile. The release version is complaining about duplicate -1s and this is… Created 4 years, 11 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
Index: components/filesystem/public/interfaces/directory.mojom
diff --git a/components/filesystem/public/interfaces/directory.mojom b/components/filesystem/public/interfaces/directory.mojom
index bd5aba4dceebf1c57dc3442452b8499d82d7c69e..4d521aea2542c06d5aeb5e3f19c527f159b8b2b2 100644
--- a/components/filesystem/public/interfaces/directory.mojom
+++ b/components/filesystem/public/interfaces/directory.mojom
@@ -52,6 +52,12 @@ interface Directory {
// fsync()/FlushFileBuffers().
Flush() => (FileError error);
+ // Reads the contents of an entire file.
+ ReadEntireFile(string path) => (FileError error, array<uint8> data);
+
+ // Writes |data| to |path|, overwriting the file if it already exists.
+ WriteFile(string path, array<uint8> data) => (FileError 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

Powered by Google App Engine
This is Rietveld 408576698