[ox/fs] Add FileSystem::write variants that take Spans
This commit is contained in:
parent
3c9ce4436a
commit
c0aa119155
9
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
9
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -9,6 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <ox/std/buffer.hpp>
|
||||
#include <ox/std/span.hpp>
|
||||
|
||||
#include <ox/fs/filestore/filestoretemplate.hpp>
|
||||
#include <ox/fs/filesystem/filelocation.hpp>
|
||||
@ -66,10 +67,18 @@ class FileSystem {
|
||||
return writeFilePath(path, buffer, size, FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(CRStringView path, ox::Span<char> const&buff) noexcept {
|
||||
return write(path, buff.data(), buff.size(), FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(uint64_t inode, const void *buffer, uint64_t size) noexcept {
|
||||
return write(inode, buffer, size, FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(uint64_t inode, ox::Span<char> const&buff) noexcept {
|
||||
return write(inode, buff.data(), buff.size(), FileType::NormalFile);
|
||||
}
|
||||
|
||||
Error write(const FileAddress &addr, const void *buffer, uint64_t size, FileType fileType = FileType::NormalFile) noexcept;
|
||||
|
||||
inline Error write(CRStringView path, const void *buffer, uint64_t size, FileType fileType) noexcept {
|
||||
|
Loading…
x
Reference in New Issue
Block a user