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; |
+}; |