diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.hpp b/deps/ox/src/ox/fs/filesystem/filesystem.hpp index 868a8aeb..13fc2027 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.hpp @@ -165,6 +165,8 @@ class FileSystemTemplate: public MemFS { FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*) = detail::fsBuffFree) noexcept; + explicit FileSystemTemplate(ox::Buffer &buffer) noexcept; + explicit FileSystemTemplate(FileStore fs) noexcept; ~FileSystemTemplate() noexcept override; @@ -238,6 +240,11 @@ FileSystemTemplate::FileSystemTemplate(FileStore fs) noexc m_fs = fs; } +template +FileSystemTemplate::FileSystemTemplate(ox::Buffer &buffer) noexcept: + m_fs(buffer.data(), static_cast(buffer.size())) { +} + template FileSystemTemplate::FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*)) noexcept: m_fs(buffer, static_cast(bufferSize)),