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

Side by Side 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, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 module mojo.files;
6
7 // Error codes used by the file manager.
8 enum Error {
9 OK = 0,
10 UNKNOWN,
11 INVALID_ARGUMENT,
12 PERMISSION_DENIED,
13 OUT_OF_RANGE,
14 UNIMPLEMENTED,
15 CLOSED,
16 UNAVAILABLE,
17 INTERNAL,
18 };
19
20 enum Whence {
21 FROM_CURRENT,
22 FROM_START,
23 FROM_END,
24 };
25
26 struct FileTimes {
27 int64 atime;
28 int64 mtime;
29 };
30
31 struct FileInformation {
32 int64 size;
33 FileTimes? times;
34 };
35
36 const uint32 kAccessFlagRead = 0x1;
37 const uint32 kAccessFlagWrite = 0x2;
38
39 //FIXME only affects "write"
40 const uint32 kOpenFlagCreate = 0x1;
41 //FIXME only meaningful with "create"
42 const uint32 kOpenFlagExclusive = 0x2;
43 const uint32 kOpenFlagAppend = 0x4;
44 const uint32 kOpenFlagTruncate = 0x8;
45
46 enum FileType {
47 UNKNOWN,
48 REGULAR_FILE,
49 DIRECTORY,
50 };
51
52 struct DirectoryEntry {
53 FileType type;
54 string name;
55 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698