diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.hpp b/deps/ox/src/ox/fs/filesystem/filesystem.hpp index 5cef1551..c39f556d 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.hpp @@ -99,6 +99,21 @@ class FileSystem { Result stat(const FileAddress &addr) const noexcept; + [[nodiscard]] + inline bool exists(uint64_t inode) const noexcept { + return statInode(inode).ok(); + } + + [[nodiscard]] + inline bool exists(ox::StringView path) const noexcept { + return statPath(path).ok(); + } + + [[nodiscard]] + inline bool exists(FileAddress const&addr) const noexcept { + return stat(addr).ok(); + } + [[nodiscard]] virtual uint64_t spaceNeeded(uint64_t size) const noexcept = 0;