[ox/fs] Add base path access to PassthroughFS
This commit is contained in:
parent
5dbe160633
commit
05c0eb2f78
2
deps/ox/src/ox/fs/filesystem/directory.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/directory.hpp
vendored
@ -11,7 +11,7 @@
|
||||
#include <ox/fs/filesystem/pathiterator.hpp>
|
||||
#include <ox/fs/filestore/filestoretemplate.hpp>
|
||||
#include <ox/ptrarith/nodebuffer.hpp>
|
||||
#include <ox/std/std.hpp>
|
||||
#include <ox/std/byteswap.hpp>
|
||||
|
||||
namespace ox {
|
||||
|
||||
|
@ -21,6 +21,10 @@ PassThroughFS::PassThroughFS(const char *dirPath) {
|
||||
PassThroughFS::~PassThroughFS() {
|
||||
}
|
||||
|
||||
std::string PassThroughFS::basePath() {
|
||||
return m_path.string();
|
||||
}
|
||||
|
||||
Error PassThroughFS::mkdir(const char *path, bool recursive) {
|
||||
bool success = false;
|
||||
const auto p = m_path / stripSlash(path);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#if __has_include(<filesystem>)
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
#include "filesystem.hpp"
|
||||
|
||||
@ -28,6 +29,8 @@ class PassThroughFS: public FileSystem {
|
||||
|
||||
~PassThroughFS();
|
||||
|
||||
[[nodiscard]] std::string basePath();
|
||||
|
||||
Error mkdir(const char *path, bool recursive = false) override;
|
||||
|
||||
Error move(const char *src, const char *dest) override;
|
||||
|
2
deps/ox/src/ox/fs/filesystem/types.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/types.hpp
vendored
@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ox/std/std.hpp>
|
||||
#include <ox/std/types.hpp>
|
||||
|
||||
namespace ox {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user