Uni/Stat#
Wrapper for the Unix stat C struct.
Info
To use declarations from this page, include the <essence/uni/stat.hpp> header.
The declarations are found within the essence::uni namespace.
-
enum class filetype : i32#
-
enumerator regular = S_IFREG#
-
enumerator symlink = S_IFLNK#
-
enumerator directory = S_IFDIR#
-
enumerator socket = S_IFSOCK#
-
enumerator character = S_IFCHR#
-
enumerator block = S_IFBLK#
-
enumerator fifo = S_IFIFO#
-
enumerator unknown = 65535#
-
enumerator regular = S_IFREG#
-
struct permission#
Represents the three access permission bits for a file.
-
bool read{false}#
-
bool write{false}#
-
bool exec{false}#
-
bool read{false}#
-
class permissions#
Represents permissions for the owner, group and others along with the setuid, setgid and sticky bits.
-
permission owner#
-
permission group#
-
permission other#
-
bool setuid{false}#
-
bool setgid{false}#
-
bool sticky{false}#
-
std::string octal() const#
Return an octal string representation of the permissions.
-
permission owner#
-
struct filetime#
Represents the time points associated with a file.
-
std::chrono::time_point<std::chrono::file_clock> access#
-
std::chrono::time_point<std::chrono::file_clock> modify#
-
std::chrono::time_point<std::chrono::file_clock> change#
-
std::chrono::time_point<std::chrono::file_clock> access#
-
struct owners#
Represents the owning user and group of a file.
-
gid_t gid#
-
uid_t uid#
-
std::string group#
-
std::string user#
-
gid_t gid#
-
class status#
Wrapper around the
statC struct.-
status::status(std::filesystem::path, bool follow = false)#
Constructor accepting a filesystem path, and a boolean determining whether or not to follow a potential symlink.
-
const struct stat &raw() const#
Getter for the underlying
statstruct.
-
const permissions &perms() const#
Getter for the file permissions.
-
uid_t uid() const#
Getter for the user id.
-
gid_t gid() const#
Getter for the group id.
-
dev_t device() const#
-
dev_t special_device() const#
-
blkcnt_t blocks() const#
-
blksize_t blocksize() const#
-
std::string basename() const#
-
std::string stem() const#
-
std::string typestr() const#
-
status::status(std::filesystem::path, bool follow = false)#