[ox/fs] Cleanup, Add error messages for unsupported methods in PassThroughFS

This commit is contained in:
2021-05-11 00:52:47 -05:00
parent 5c66f3e0dc
commit cdd1de89f8
2 changed files with 19 additions and 19 deletions

View File

@ -84,7 +84,7 @@ class PassThroughFS: public FileSystem {
/**
* Strips the leading slashes from a string.
*/
const char *stripSlash(const char *path) noexcept;
static const char *stripSlash(const char *path) noexcept;
};
@ -94,7 +94,7 @@ Error PassThroughFS::ls(const char *dir, F cb) noexcept {
const auto di = std::filesystem::directory_iterator(m_path / stripSlash(dir), ec);
oxReturnError(OxError(ec.value(), "PassThroughFS: ls failed"));
for (auto &p : di) {
auto u8p = p.path().filename().u8string();
const auto u8p = p.path().filename().u8string();
oxReturnError(cb(bit_cast<const char*>(u8p.c_str()), 0));
}
return OxError(0);