diff options
Diffstat (limited to 'include/fud_file.hpp')
-rw-r--r-- | include/fud_file.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/fud_file.hpp b/include/fud_file.hpp index b468b4b..9ef2cbc 100644 --- a/include/fud_file.hpp +++ b/include/fud_file.hpp @@ -20,6 +20,7 @@ #include "fud_allocator.hpp" #include "fud_option.hpp" +#include "fud_permissions.hpp" #include "fud_result.hpp" #include "fud_status.hpp" #include "fud_string_view.hpp" @@ -135,12 +136,17 @@ class RegularFile { StringView filename, FileAccessMode mode, OpenFlags flags, + Permissions permissions, bool exclusive, Option<int> dirFdOption, Allocator* allocator = &globalFudAllocator); FudStatus close(); + FudStatus take(RegularFile& rhs); + + Result<size_t, FudStatus> size() const; + private: RegularFile() = default; @@ -155,8 +161,6 @@ class RegularFile { RegularFile& operator=(RegularFile&& rhs) noexcept; - FudStatus take(RegularFile& rhs); - private: int m_fd{-1}; FileAccessMode m_modeFlags{}; |