First implementation of custom path type.
This commit is contained in:
@@ -35,20 +35,20 @@ private:
|
||||
detail::MemoryFolder root_;
|
||||
std::vector<std::vector<std::uint8_t>> fileData_;
|
||||
public:
|
||||
[[nodiscard]] std::vector<FileInfo> listFiles(const fs::path& folder) override;
|
||||
[[nodiscard]] FileInfo getFileInfo(const fs::path& file) override;
|
||||
[[nodiscard]] StreamError open(const fs::path& path, FileOpenMode mode, std::unique_ptr<Stream>& outStream) override;
|
||||
[[nodiscard]] std::vector<FolderEntry> listFiles(PathView folder) override;
|
||||
[[nodiscard]] FileInfo getFileInfo(PathView file) override;
|
||||
[[nodiscard]] StreamError open(PathView path, FileOpenMode mode, std::unique_ptr<Stream>& outStream) override;
|
||||
|
||||
bool addFile(const fs::path& path, std::span<const std::uint8_t> data, Overwrite overwrite = Overwrite::NO, CopyData copyData = CopyData::NO);
|
||||
bool addFile(const fs::path& path, std::span<const std::uint8_t> data, CopyData copyData)
|
||||
bool addFile(PathView path, std::span<const std::uint8_t> data, Overwrite overwrite = Overwrite::NO, CopyData copyData = CopyData::NO);
|
||||
bool addFile(PathView path, std::span<const std::uint8_t> data, CopyData copyData)
|
||||
{
|
||||
return addFile(path, data, Overwrite::NO, copyData);
|
||||
}
|
||||
void addFolder(const fs::path& path);
|
||||
void addFolder(PathView path);
|
||||
private:
|
||||
detail::MemoryFolder* findFolder(const fs::path& path, bool create = false) MIJIN_NOEXCEPT;
|
||||
FileInfo folderInfo(const fs::path& path, const detail::MemoryFolder& folder) const MIJIN_NOEXCEPT;
|
||||
FileInfo fileInfo(const fs::path& path, const detail::MemoryFile& file) const MIJIN_NOEXCEPT;
|
||||
detail::MemoryFolder* findFolder(PathView path, bool create = false) MIJIN_NOEXCEPT;
|
||||
FileInfo folderInfo(const detail::MemoryFolder& folder) const MIJIN_NOEXCEPT;
|
||||
FileInfo fileInfo(const detail::MemoryFile& file) const MIJIN_NOEXCEPT;
|
||||
};
|
||||
} // namespace mijin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user