Provides directory operations using std::filesystem.
Definition dir.h:34
Error remove() const
Removes this directory (must be empty).
Error mkdir() const
Creates this directory.
FilePath path() const
Returns the directory path.
Definition dir.h:61
static Error setCurrent(const FilePath &path)
Sets the current working directory.
Dir(const String &path)
Constructs a Dir from a String path.
Definition dir.h:49
bool isEmpty() const
Returns true if the directory is empty.
Error mkpath() const
Creates this directory and all parent directories.
Dir()=default
Constructs a Dir with an empty path.
static Dir temp()
Returns a Dir for the system temp directory.
List< FilePath > entryList() const
Returns a list of all entries in the directory.
bool exists() const
Returns true if the directory exists.
Dir(const char *path)
Constructs a Dir from a C string path.
Definition dir.h:55
Dir(const FilePath &path)
Constructs a Dir for the given path.
Definition dir.h:43
List< FilePath > entryList(const String &filter) const
Returns a filtered list of entries in the directory.
static Dir current()
Returns a Dir for the current working directory.
Error removeRecursively() const
Removes this directory and all its contents.
static Dir home()
Returns a Dir for the user's home directory.
Lightweight error code wrapper for the promeki library.
Definition error.h:39
Simple value type wrapping std::filesystem::path.
Definition filepath.h:27
Dynamic array container wrapping std::vector.
Definition list.h:40
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19