[ox/fs] Add new version of ls and make direct read return const

This commit is contained in:
2021-04-17 16:36:39 -05:00
parent fef0ff58c3
commit 772cc7d954
4 changed files with 40 additions and 12 deletions

View File

@ -43,13 +43,15 @@ class PassThroughFS: public FileSystem {
Error read(const char *path, void *buffer, std::size_t buffSize) noexcept override;
Result<uint8_t*> read(const char*) noexcept override;
Result<const uint8_t*> read(const char*) noexcept override;
Error read(uint64_t inode, void *buffer, std::size_t size) noexcept override;
Error read(uint64_t inode, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept override;
Result<uint8_t*> read(uint64_t) noexcept override;
Result<const uint8_t*> read(uint64_t) noexcept override;
Result<Vector<String>> ls(const char *dir) noexcept override;
template<typename F>
Error ls(const char *dir, F cb) noexcept;