paul@181 | 1 | #include <systypes/base.h> /* flags_t, object_flags_t, offset_t */ |
paul@181 | 2 | |
paul@232 | 3 | /* An interface providing a way of opening or manipulating filesystem objects |
paul@232 | 4 | relying on a dataspace to transfer filesystem paths specifying the objects |
paul@232 | 5 | involved. */ |
paul@181 | 6 | |
paul@181 | 7 | interface OpenerContext |
paul@181 | 8 | { |
paul@181 | 9 | /* Mount the filesystem reference given a mountpoint path written to the |
paul@181 | 10 | dataspace. */ |
paul@181 | 11 | |
paul@181 | 12 | [opcode(0)] void mount(in cap fs); |
paul@181 | 13 | |
paul@181 | 14 | /* Obtain a filesystem reference. */ |
paul@181 | 15 | |
paul@181 | 16 | [opcode(1)] void getfs(out cap fs); |
paul@181 | 17 | |
paul@271 | 18 | /* Make a new directory given a path written to the context's dataspace. */ |
paul@271 | 19 | |
paul@271 | 20 | [opcode(18)] void mkdir(in sys_mode_t mode); |
paul@271 | 21 | |
paul@181 | 22 | /* Obtain a file reference given a path written to the context's dataspace. */ |
paul@181 | 23 | |
paul@181 | 24 | [opcode(12)] void open(in flags_t flags, out offset_t size, out cap file, |
paul@181 | 25 | out object_flags_t object_flags); |
paul@232 | 26 | |
paul@232 | 27 | /* Remove a file using a path written to the context's dataspace. */ |
paul@232 | 28 | |
paul@232 | 29 | [opcode(14)] void remove(); |
paul@236 | 30 | |
paul@236 | 31 | /* Rename a file within a filesystem using paths written to the context's |
paul@236 | 32 | dataspace. */ |
paul@236 | 33 | |
paul@236 | 34 | [opcode(15)] void rename(); |
paul@266 | 35 | |
paul@266 | 36 | /* Obtain file metadata given a path written to the context's dataspace, |
paul@266 | 37 | writing the metadata to the dataspace. */ |
paul@266 | 38 | |
paul@266 | 39 | [opcode(11)] void stat(); |
paul@181 | 40 | }; |
paul@181 | 41 | |
paul@181 | 42 | /* vim: tabstop=2 expandtab shiftwidth=2 |
paul@181 | 43 | */ |