4#ifndef GREM_CORE_SYSTEM_NATIVE_FILESYSTEM_HPP
5#define GREM_CORE_SYSTEM_NATIVE_FILESYSTEM_HPP
Base interface for a file in a Filesystem.
Definition File.hpp:31
constexpr Filesystem() noexcept=default
Default constructor.
Definition FunctionView.hpp:29
void createOutputDirectory(CStringView filepath) override
Create a new host directory relative to the current output directory, while also creating any missing...
CStringView findInputArchiveOfFile(CStringView filepath) const noexcept override
Get the host filepath of the mounted input archive on the host filesystem that contains a given virtu...
void createEmptyOutputFile(CStringView filepath) override
Create an empty file relative to the current output directory, overwriting any existing file at the s...
CStringView getOutputDirectory() const noexcept override
Get the current output directory of the filesystem.
InputFileHandle openInputFile(CStringView filepath) const override
Open an input file in the virtual filesystem for reading.
void deleteOutputFile(CStringView filepath) override
Delete a host file or directory relative to the current output directory.
OutputFileHandle openOutputFileForAppending(CStringView filepath) override
Open a file relative to the current output directory for appended writing, or create an empty file an...
void createParentOutputDirectories(CStringView filepath) override
Create any missing parent directories above a host directory relative to the current output directory...
constexpr NativeFilesystem() noexcept=default
Default constructor.
InputFileHandle tryOpenInputFile(CStringView filepath) const override
Try to open an input file in the virtual filesystem for reading.
OutputFileHandle openEmptyOutputFile(CStringView filepath) override
Create a file relative to the current output directory and open it for writing, overwriting any exist...
void forEachInputFilenameInDirectory(CStringView filepath, FunctionView< bool(CStringView filename)> callback) const override
Iterate the filenames of all readable virtual filepaths that are direct children of a given directory...
File::Metadata getFileMetadata(CStringView filepath) const override
Get the metadata of a file that is mounted at a given virtual filepath.
bool inputFileExists(CStringView filepath) const override
Check if a given virtual filepath has a corresponding host file mounted.
Generic boxed unique handle to a writable file in any filesystem.
Definition File.hpp:686
CStringViewBase< char, std::char_traits< char > > CStringView
Definition CStringView.hpp:635