sys_fs: Implemented sys_fs_mount(prot=1) read-only mounting & fixed up some operation and permission checks

This commit is contained in:
brian218 2023-05-25 14:31:17 +08:00 committed by kd-11
parent 5e6aa45658
commit 6a570ae57e
6 changed files with 183 additions and 212 deletions

View file

@ -165,8 +165,8 @@ namespace fs
// Set virtual device with specified name (nullptr for deletion)
shared_ptr<device_base> set_virtual_device(const std::string& name, shared_ptr<device_base> device);
// Try to get parent directory (returns empty string on failure)
std::string get_parent_dir(std::string_view path, u32 levels = 1);
// Try to get normalized parent directory
std::string get_parent_dir(std::string_view path, u32 parent_level = 1);
// Get file information
bool stat(const std::string& path, stat_t& info);