Euphoria
|
vfs.cc
Go to the documentation of this file.
321 auto catalog = std::make_shared<ReadRootPhysicalFolder>(make_sure_folder_ends_with_slash(folder));
std::vector< std::string > from_key_to_string_vector(const std::map< TKey, TValue > &map)
Definition: stringutils.h:178
std::string make_sure_folder_ends_with_slash(const std::string &folder)
Definition: vfs.cc:282
std::string combine_folder_and_path(const std::string &folder, const FilePath &path)
Definition: vfs.cc:268
std::shared_ptr< MemoryChunk > read_file_to_chunk(const std::string &full_path)
Definition: io.cc:37
std::optional< DirPath > resolve_relative(const DirPath &base)
Definition: vfs_path.cc:349
void write_chunk_to_file(std::shared_ptr< MemoryChunk > chunk, const std::string &full_path)
Definition: io.cc:14
std::shared_ptr< MemoryChunk > create_memory_chunk_from_string(const std::string &content)
Definition: memorychunk.cc:66
String utility functions.
static std::shared_ptr< MemoryChunk > create_null()
Definition: memorychunk.cc:47
std::string merge(const std::vector< std::string > &strings) const
Definition: stringmerger.cc:11
Definition: vfs_path.h:67
Definition: vfs.h:26
Definition: vfs_path.h:36
Definition: vfs.h:74
std::vector< std::shared_ptr< ReadRoot > > read_roots
Definition: vfs.h:75
std::optional< std::string > read_file_to_string(const FilePath &path)
Definition: vfs.cc:171
void add_read_root(const std::shared_ptr< ReadRoot > &root)
Definition: vfs.cc:72
void write_file(const FilePath &path, std::shared_ptr< MemoryChunk > data)
Definition: vfs.cc:116
std::shared_ptr< MemoryChunk > read_file(const FilePath &path)
Definition: vfs.cc:86
~FileSystem()
std::vector< ListedFile > list_files(const DirPath &path)
Definition: vfs.cc:127
FileSystem()
void set_write_root(const std::shared_ptr< WriteRoot > &root)
Definition: vfs.cc:79
Definition: vfs.h:16
ListedFile()=default
ReadRootCatalog()
void register_file_data(const FilePath &path, const std::shared_ptr< MemoryChunk > &content)
Definition: vfs.cc:206
void add_description(std::vector< std::string > *strings) override
Definition: vfs.cc:240
static std::shared_ptr< ReadRootCatalog > create_and_add(FileSystem *fs)
Definition: vfs.cc:216
FileList list_files(const DirPath &path) override
Definition: vfs.cc:247
std::shared_ptr< MemoryChunk > read_file(const FilePath &path) override
Definition: vfs.cc:226
void register_file_string(const FilePath &path, const std::string &content)
Definition: vfs.cc:194
void add_description(std::vector< std::string > *strings) override
Definition: vfs.cc:310
static void add(FileSystem *fs, const std::string &folder)
Definition: vfs.cc:317
static void add_current_directory(FileSystem *fs)
Definition: vfs.cc:328
FileList list_files(const DirPath &path) override
Definition: vfs.cc:336
std::shared_ptr< MemoryChunk > read_file(const FilePath &path) override
Definition: vfs.cc:302
ReadRootPhysicalFolder(std::string folder)
Definition: vfs.cc:295
virtual ~ReadRoot()
WriteRootPhysicalFolder(const std::string &f)
Definition: vfs.cc:368
void write_file(const FilePath &path, std::shared_ptr< MemoryChunk > data) override
Definition: vfs.cc:376
virtual ~WriteRoot()