Make fs::get_parent_dir/fs::pending_file use string_view as argument

This commit is contained in:
Eladash 2021-10-25 16:50:27 +03:00 committed by Ivan
parent ab5a33fc31
commit 149c593d89
2 changed files with 5 additions and 5 deletions

View file

@ -159,7 +159,7 @@ namespace fs
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(const std::string& path, u32 levels = 1);
std::string get_parent_dir(std::string_view path, u32 levels = 1);
// Get file information
bool stat(const std::string& path, stat_t& info);
@ -637,7 +637,7 @@ namespace fs
// This is meant to modify files atomically, overwriting is likely
bool commit(bool overwrite = true);
pending_file(const std::string& path);
pending_file(std::string_view path);
pending_file(const pending_file&) = delete;
pending_file& operator=(const pending_file&) = delete;
~pending_file();