From cc09c265e15e9598844482a8b5a22b12650b3f1b Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Thu, 18 Jan 2024 21:31:41 +0100 Subject: fs: Replace Mode enum by OpenMode enum --- src/core/file_sys/vfs/vfs.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/core/file_sys/vfs/vfs.h') diff --git a/src/core/file_sys/vfs/vfs.h b/src/core/file_sys/vfs/vfs.h index 6830244e3..f846a9669 100644 --- a/src/core/file_sys/vfs/vfs.h +++ b/src/core/file_sys/vfs/vfs.h @@ -13,12 +13,11 @@ #include "common/common_funcs.h" #include "common/common_types.h" +#include "core/file_sys/fs_filesystem.h" #include "core/file_sys/vfs/vfs_types.h" namespace FileSys { -enum class Mode : u32; - // An enumeration representing what can be at the end of a path in a VfsFilesystem enum class VfsEntryType { None, @@ -49,9 +48,9 @@ public: virtual VfsEntryType GetEntryType(std::string_view path) const; // Opens the file with path relative to root. If it doesn't exist, returns nullptr. - virtual VirtualFile OpenFile(std::string_view path, Mode perms); + virtual VirtualFile OpenFile(std::string_view path, OpenMode perms); // Creates a new, empty file at path - virtual VirtualFile CreateFile(std::string_view path, Mode perms); + virtual VirtualFile CreateFile(std::string_view path, OpenMode perms); // Copies the file from old_path to new_path, returning the new file on success and nullptr on // failure. virtual VirtualFile CopyFile(std::string_view old_path, std::string_view new_path); @@ -62,9 +61,9 @@ public: virtual bool DeleteFile(std::string_view path); // Opens the directory with path relative to root. If it doesn't exist, returns nullptr. - virtual VirtualDir OpenDirectory(std::string_view path, Mode perms); + virtual VirtualDir OpenDirectory(std::string_view path, OpenMode perms); // Creates a new, empty directory at path - virtual VirtualDir CreateDirectory(std::string_view path, Mode perms); + virtual VirtualDir CreateDirectory(std::string_view path, OpenMode perms); // Copies the directory from old_path to new_path, returning the new directory on success and // nullptr on failure. virtual VirtualDir CopyDirectory(std::string_view old_path, std::string_view new_path); -- cgit v1.2.3