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

Side by Side Diff: mojo/services/files/public/interfaces/file.mojom

Issue 1013313002: Move services/files/*.mojom -> mojo/services/files/public/interfaces/. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
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 // TODO(vtl): notes to self: 5 // TODO(vtl): notes to self:
6 // - file offsets, file positions, and file sizes are int64 (though positions 6 // - file offsets, file positions, and file sizes are int64 (though positions
7 // and sizes must always be non-negative) 7 // and sizes must always be non-negative)
8 // - buffer size parameters (for read/write) are uint32 8 // - buffer size parameters (for read/write) are uint32
9 9
10 module mojo.files; 10 module mojo.files;
11 11
12 import "services/files/types.mojom"; 12 import "files/public/interfaces/types.mojom";
13 13
14 // TODO(vtl): Write comments. 14 // TODO(vtl): Write comments.
15 interface File { 15 interface File {
16 // Flushes/closes this file; no operations may be performed on this file after 16 // Flushes/closes this file; no operations may be performed on this file after
17 // this. Note that any error code is strictly informational -- the close may 17 // this. Note that any error code is strictly informational -- the close may
18 // not be retried. 18 // not be retried.
19 Close() => (Error err); 19 Close() => (Error err);
20 20
21 // Reads (at most) |num_bytes_to_read| from the location specified by 21 // Reads (at most) |num_bytes_to_read| from the location specified by
22 // |offset|/|whence|. On success, |bytes_read| is set to the data read. 22 // |offset|/|whence|. On success, |bytes_read| is set to the data read.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // not), can remove "append"? (probably not?). Do we allow "truncate"? 76 // not), can remove "append"? (probably not?). Do we allow "truncate"?
77 Reopen(File& file, uint32 open_flags) => (Error error); 77 Reopen(File& file, uint32 open_flags) => (Error error);
78 78
79 // TODO(vtl): probably should have access flags (but also exec?); how do these 79 // TODO(vtl): probably should have access flags (but also exec?); how do these
80 // relate to access mode? 80 // relate to access mode?
81 AsBuffer() => (Error error, handle<shared_buffer>? buffer); 81 AsBuffer() => (Error error, handle<shared_buffer>? buffer);
82 82
83 // TODO(vtl): Add a "watch"? 83 // TODO(vtl): Add a "watch"?
84 // TODO(vtl): Add something analogous to fsync(2)? 84 // TODO(vtl): Add something analogous to fsync(2)?
85 }; 85 };
OLDNEW
« no previous file with comments | « mojo/services/files/public/interfaces/directory.mojom ('k') | mojo/services/files/public/interfaces/files.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698