77 std::string
str()
const;
179 std::string filepath_;
The class for file path operations.
Definition filepath.h:34
filepath & operator=(const filepath &other)
Assign operator, assign a new filepath object by copy.
std::string abspath() const
Get the absolute path of the filepath.
bool isdir() const
Check if the filepath is a directory.
std::string extension() const
Get the extension of the filepath.
std::string realpath() const
Get the real path referenced by symbolic link.
bool exists() const
Check if the filepath is exists.
bool issymlink() const
Check if the filepath is a symbolic link.
static char separator()
Get the path separator of the current os platform.
std::string str() const
Get the string of the filepath.
filepath join(const std::string &filename) const
Join the current filepath with a new filename.
filepath(const std::string &path)
Construct a new filepath object.
filepath(const filepath &other)
Construct a new filepath object by copy.
std::string dirname() const
Get the parent directory of the filepath.
filetype type() const
Get the file type of the filepath.
std::string basename() const
Get the filename or directory name of the filepath.
bool executable() const
Check if the filepath is executable.
bool writable() const
Check if the filepath is writable.
bool isfile() const
Check if the filepath is a regular file.
bool readable() const
Check if the filepath is readable.
~filepath()=default
Destroy the filepath object.
std::ostream & operator<<(std::ostream &os, const datetime &dt)
Define the output stream operator for datetime object.
filepath path(const std::string &path)
Create a filepath object from a string.
Define the structs about fileutil, such as filetype and file_entity.
filetype
The type of file.
Definition filetype.h:38