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

Unified Diff: services/file_manager/types.mojom

Issue 875643004: Prototype of Files service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: wipwipwip Created 5 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: services/file_manager/types.mojom
diff --git a/services/file_manager/types.mojom b/services/file_manager/types.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..d243f064a0b93a34e756cca765bde4b3ce131694
--- /dev/null
+++ b/services/file_manager/types.mojom
@@ -0,0 +1,55 @@
+// 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;
+
+// Error codes used by the file manager.
+enum Error {
+ OK = 0,
+ UNKNOWN,
+ INVALID_ARGUMENT,
+ PERMISSION_DENIED,
+ OUT_OF_RANGE,
+ UNIMPLEMENTED,
+ CLOSED,
+ UNAVAILABLE,
+ INTERNAL,
+};
+
+enum Whence {
+ FROM_CURRENT,
+ FROM_START,
+ FROM_END,
+};
+
+struct FileTimes {
+ int64 atime;
+ int64 mtime;
+};
+
+struct FileInformation {
+ int64 size;
+ FileTimes? times;
+};
+
+const uint32 kAccessFlagRead = 0x1;
+const uint32 kAccessFlagWrite = 0x2;
+
+//FIXME only affects "write"
+const uint32 kOpenFlagCreate = 0x1;
+//FIXME only meaningful with "create"
+const uint32 kOpenFlagExclusive = 0x2;
+const uint32 kOpenFlagAppend = 0x4;
+const uint32 kOpenFlagTruncate = 0x8;
+
+enum FileType {
+ UNKNOWN,
+ REGULAR_FILE,
+ DIRECTORY,
+};
+
+struct DirectoryEntry {
+ FileType type;
+ string name;
+};

Powered by Google App Engine
This is Rietveld 408576698