OLD | NEW |
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 filesystem; | 10 module filesystem.mojom; |
11 | 11 |
12 import "components/filesystem/public/interfaces/types.mojom"; | 12 import "components/filesystem/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() => (FileError err); | 19 Close() => (FileError err); |
20 | 20 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 [Sync] | 68 [Sync] |
69 Lock() => (FileError error); | 69 Lock() => (FileError error); |
70 | 70 |
71 // Unlocks a previously locked file. | 71 // Unlocks a previously locked file. |
72 [Sync] | 72 [Sync] |
73 Unlock() => (FileError error); | 73 Unlock() => (FileError error); |
74 | 74 |
75 // Returns a handle to the file for raw access. | 75 // Returns a handle to the file for raw access. |
76 AsHandle() => (FileError error, handle file_handle); | 76 AsHandle() => (FileError error, handle file_handle); |
77 }; | 77 }; |
OLD | NEW |