| 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 mojo.files; | 10 module mojo.files; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // TODO(vtl): What are the rules for reopening (w.r.t. changing mode/flags). | 74 // TODO(vtl): What are the rules for reopening (w.r.t. changing mode/flags). |
| 75 // E.g., obviously can go from "read-write" to "read", but reverse? (probably | 75 // E.g., obviously can go from "read-write" to "read", but reverse? (probably |
| 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 // Special-file-specific control function, for device "files". |in| and |out| |
| 84 // are dependent on |request|. |
| 85 // TODO(vtl): Make a master list of request values somewhere. |
| 86 Ioctl(uint32 request, array<uint32>? in_values) |
| 87 => (Error error, array<uint32>? out_values); |
| 88 |
| 83 // TODO(vtl): Add a "watch"? | 89 // TODO(vtl): Add a "watch"? |
| 84 // TODO(vtl): Add something analogous to fsync(2)? | 90 // TODO(vtl): Add something analogous to fsync(2)? |
| 85 }; | 91 }; |
| OLD | NEW |