From 53c4dcf374c66f1e9190f5a62a52d02fe11a69e6 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 16 Oct 2024 22:25:08 -0500 Subject: First crack at allocators. --- include/fud_directory.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include/fud_directory.hpp') 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 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}; }; -- cgit v1.2.3