summaryrefslogtreecommitdiff
path: root/include/fud_directory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fud_directory.hpp')
-rw-r--r--include/fud_directory.hpp11
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};
};