Add support for mounting and unmounting CELL_FS_SIMPLEFS

This commit is contained in:
brian218 2022-10-31 21:59:02 +08:00 committed by Ivan
parent ecc194cb62
commit c7ced46707
4 changed files with 72 additions and 22 deletions

View file

@ -33,7 +33,7 @@ struct vfs_manager
vfs_directory root{};
};
bool vfs::mount(std::string_view vpath, std::string_view path, bool create_dir, bool is_dir)
bool vfs::mount(std::string_view vpath, std::string_view path, bool is_dir)
{
if (vpath.empty())
{
@ -42,12 +42,6 @@ bool vfs::mount(std::string_view vpath, std::string_view path, bool create_dir,
return false;
}
if (create_dir && !fs::is_dir(std::string(path)) && !fs::create_dir(std::string(path)))
{
vfs_log.error("Cannot create directory \"%s\"", path);
return false;
}
// Workaround
g_fxo->need<vfs_manager>();