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; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Updates this file's atime and/or mtime to the time specified by |atime| (or | 52 // Updates this file's atime and/or mtime to the time specified by |atime| (or |
53 // |mtime|, respectively), which may also indicate "now". If |atime| or | 53 // |mtime|, respectively), which may also indicate "now". If |atime| or |
54 // |mtime| is null, then the corresponding time is not modified. | 54 // |mtime| is null, then the corresponding time is not modified. |
55 Touch(TimespecOrNow? atime, TimespecOrNow? mtime) => (FileError error); | 55 Touch(TimespecOrNow? atime, TimespecOrNow? mtime) => (FileError error); |
56 | 56 |
57 // Creates a new |File| instance, which shares the same "file description". | 57 // Creates a new |File| instance, which shares the same "file description". |
58 // I.e., the access mode, etc. (as specified to |Directory::OpenFile()| by the | 58 // I.e., the access mode, etc. (as specified to |Directory::OpenFile()| by the |
59 // |open_flags| argument) as well as file position. | 59 // |open_flags| argument) as well as file position. |
60 Dup(File& file) => (FileError error); | 60 Dup(File& file) => (FileError error); |
61 | 61 |
| 62 // Syncs data to disk. |
| 63 Flush() => (FileError error); |
| 64 |
62 // Returns a handle to the file for raw access. | 65 // Returns a handle to the file for raw access. |
63 AsHandle() => (FileError error, handle file_handle); | 66 AsHandle() => (FileError error, handle file_handle); |
64 }; | 67 }; |
OLD | NEW |