diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-16 22:25:08 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-16 22:25:08 -0500 |
commit | 53c4dcf374c66f1e9190f5a62a52d02fe11a69e6 (patch) | |
tree | ee40277c36fdba58fb06aca87b8ffa67ab5f8558 /include/fud_directory.hpp | |
parent | f3ac764684c64fbdd2094853a80b23e570cd5d9c (diff) |
First crack at allocators.
Diffstat (limited to 'include/fud_directory.hpp')
-rw-r--r-- | include/fud_directory.hpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/fud_directory.hpp b/include/fud_directory.hpp index ca94528..d2bd53d 100644 --- a/include/fud_directory.hpp +++ b/include/fud_directory.hpp @@ -91,7 +91,8 @@ struct DirectoryEntry { class Directory { public: - explicit Directory(const String& name); + // explicit Directory(const String& name); + static Result<Directory, FudStatus> make(const String& name); Directory(const Directory& rhs) = delete; Directory(Directory&& rhs) noexcept; ~Directory(); @@ -102,11 +103,6 @@ class Directory { return m_name; } - constexpr FudStatus status() const - { - return m_status; - } - constexpr int errorCode() const { return m_errorCode; @@ -119,11 +115,10 @@ class Directory { FudStatus reset(); private: - bool valid() const; + Directory() = default; String m_name{}; DIR* m_directory{nullptr}; - FudStatus m_status{FudStatus::ObjectInvalid}; int m_errorCode{-1}; int m_dirFd{-1}; }; |