[ox] Rename CRStringView to StringViewCR

This commit is contained in:
2024-09-28 16:09:43 -05:00
parent 829dc0298e
commit cc10631b55
27 changed files with 168 additions and 168 deletions

View File

@ -29,29 +29,29 @@ class PassThroughFS: public FileSystem {
std::filesystem::path m_path;
public:
explicit PassThroughFS(CRStringView dirPath);
explicit PassThroughFS(StringViewCR dirPath);
~PassThroughFS() noexcept override;
[[nodiscard]]
String basePath() const noexcept;
Error mkdir(CRStringView path, bool recursive) noexcept override;
Error mkdir(StringViewCR path, bool recursive) noexcept override;
Error move(CRStringView src, CRStringView dest) noexcept override;
Error move(StringViewCR src, StringViewCR dest) noexcept override;
Result<Vector<String>> ls(CRStringView dir) const noexcept override;
Result<Vector<String>> ls(StringViewCR dir) const noexcept override;
template<typename F>
Error ls(CRStringView dir, F cb) const noexcept;
Error ls(StringViewCR dir, F cb) const noexcept;
Error remove(CRStringView path, bool recursive) noexcept override;
Error remove(StringViewCR path, bool recursive) noexcept override;
Error resize(uint64_t size, void *buffer) noexcept override;
Result<FileStat> statInode(uint64_t inode) const noexcept override;
Result<FileStat> statPath(CRStringView path) const noexcept override;
Result<FileStat> statPath(StringViewCR path) const noexcept override;
[[nodiscard]]
uint64_t spaceNeeded(uint64_t size) const noexcept override;
@ -69,13 +69,13 @@ class PassThroughFS: public FileSystem {
bool valid() const noexcept override;
protected:
Error readFilePath(CRStringView path, void *buffer, std::size_t buffSize) noexcept override;
Error readFilePath(StringViewCR path, void *buffer, std::size_t buffSize) noexcept override;
Error readFileInode(uint64_t inode, void *buffer, std::size_t size) noexcept override;
Error readFileInodeRange(uint64_t inode, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept override;
Error writeFilePath(CRStringView path, const void *buffer, uint64_t size, FileType fileType) noexcept override;
Error writeFilePath(StringViewCR path, const void *buffer, uint64_t size, FileType fileType) noexcept override;
Error writeFileInode(uint64_t inode, const void *buffer, uint64_t size, FileType fileType) noexcept override;
@ -89,7 +89,7 @@ class PassThroughFS: public FileSystem {
};
template<typename F>
Error PassThroughFS::ls(CRStringView dir, F cb) const noexcept {
Error PassThroughFS::ls(StringViewCR dir, F cb) const noexcept {
std::error_code ec;
const auto di = std::filesystem::directory_iterator(m_path / stripSlash(dir), ec);
oxReturnError(OxError(static_cast<ox::ErrorCode>(ec.value()), "PassThroughFS: ls failed"));