plugify 1.2.8
|
Simple filesystem interface for reading files and iterating directories. More...
#include <file_system.hpp>
Public Member Functions | |
virtual Result< std::string > | ReadTextFile (const std::filesystem::path &path)=0 |
Read entire file as text. | |
virtual Result< std::vector< uint8_t > > | ReadBinaryFile (const std::filesystem::path &path)=0 |
Read entire file as binary. | |
virtual Result< void > | WriteTextFile (const std::filesystem::path &path, std::string_view content)=0 |
Write text to file. | |
virtual Result< void > | WriteBinaryFile (const std::filesystem::path &path, std::span< const uint8_t > data)=0 |
Write binary data to file. | |
virtual bool | IsExists (const std::filesystem::path &path)=0 |
Check if path exists. | |
virtual bool | IsDirectory (const std::filesystem::path &path)=0 |
Check if path is a directory. | |
virtual bool | IsRegularFile (const std::filesystem::path &path)=0 |
Check if path is a regular file. | |
virtual Result< FileInfo > | GetFileInfo (const std::filesystem::path &path)=0 |
Get file information. | |
virtual Result< std::vector< FileInfo > > | ListDirectory (const std::filesystem::path &directory)=0 |
List files in directory (non-recursive) | |
virtual Result< std::vector< FileInfo > > | IterateDirectory (const std::filesystem::path &directory, const DirectoryIterationOptions &options={})=0 |
Iterate over files in directory with options. | |
virtual Result< std::vector< std::filesystem::path > > | FindFiles (const std::filesystem::path &directory, std::span< const std::string_view > patterns, bool recursive=true)=0 |
Find files matching pattern. | |
virtual Result< void > | CreateDirectories (const std::filesystem::path &path)=0 |
Create directory (including parents) | |
virtual Result< void > | Remove (const std::filesystem::path &path)=0 |
Remove file or empty directory. | |
virtual Result< void > | RemoveAll (const std::filesystem::path &path)=0 |
Remove directory and all contents. | |
virtual Result< void > | Copy (const std::filesystem::path &from, const std::filesystem::path &to)=0 |
Copy file or directory. | |
virtual Result< void > | Move (const std::filesystem::path &from, const std::filesystem::path &to)=0 |
Move/rename file or directory. | |
virtual Result< std::filesystem::path > | GetAbsolutePath (const std::filesystem::path &path)=0 |
virtual Result< std::filesystem::path > | GetCanonicalPath (const std::filesystem::path &path)=0 |
virtual Result< std::filesystem::path > | GetRelativePath (const std::filesystem::path &path, const std::filesystem::path &base)=0 |
Simple filesystem interface for reading files and iterating directories.
Definition at line 51 of file file_system.hpp.