diff options
author | Benji Dial <benji@benjidial.net> | 2024-01-11 23:53:57 -0500 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-01-11 23:53:57 -0500 |
commit | c4ab2f6f440f060b1686991b24379a4998aa55a9 (patch) | |
tree | e1b4cc875554a18ac110847cca9ba55261fca9c9 /include/mercury/kernel/fs/tarfs.hpp | |
parent | 88816732b53eb536fe0e8db3d9ed15f0d1c29bb4 (diff) | |
download | hilbert-os-c4ab2f6f440f060b1686991b24379a4998aa55a9.tar.gz |
file reading, tarfs directory listing
Diffstat (limited to 'include/mercury/kernel/fs/tarfs.hpp')
-rw-r--r-- | include/mercury/kernel/fs/tarfs.hpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/mercury/kernel/fs/tarfs.hpp b/include/mercury/kernel/fs/tarfs.hpp index 41773ee..64ee481 100644 --- a/include/mercury/kernel/fs/tarfs.hpp +++ b/include/mercury/kernel/fs/tarfs.hpp @@ -12,9 +12,9 @@ namespace mercury::kernel::fs { storage::io_result next_node(storage::node_id_t &node); //name_buf must be at least 255 chars long. - storage::io_result read_name(storage::node_id_t node, char *name_buf, size_t &name_len_out); + storage::io_result read_name(storage::node_id_t node, char *name_buf, unsigned &name_len_out); //len <= 12 - storage::io_result read_num(uint64_t offset, size_t len, uint64_t &out); + storage::io_result read_num(uint64_t offset, unsigned len, uint64_t &out); public: tarfs_instance(storage::block_device *bd); @@ -25,11 +25,16 @@ namespace mercury::kernel::fs { storage::io_result get_next_child( storage::node_id_t node, storage::node_id_t &out, storage::directory_iter_t &iter) override; storage::io_result get_child( - storage::node_id_t node, storage::node_id_t &out, const char *name, size_t name_len) override; - storage::io_result get_name_length(storage::node_id_t node, size_t &length_out) override; - storage::io_result get_name(storage::node_id_t node, char *buffer, size_t &length_out) override; + storage::node_id_t node, storage::node_id_t &out, const char *name, unsigned name_len) override; + storage::io_result get_name_length(storage::node_id_t node, unsigned &length_out) override; + storage::io_result get_name(storage::node_id_t node, char *buffer, unsigned &length_out) override; storage::io_result get_file_length(storage::node_id_t node, uint64_t &length_out) override; storage::io_result get_file_type(storage::node_id_t node, storage::file_type &out) override; + storage::io_result resize_file(storage::node_id_t node, uint64_t new_length) override; + storage::io_result read_bytes_from_file( + storage::node_id_t node, uint64_t start, uint64_t count, void *into) override; + storage::io_result write_bytes_into_file( + storage::node_id_t node, uint64_t start, uint64_t count, const void *from) override; }; |