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 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#
-
bool chmod(std::string_view file, const mode &m)#
Applies mode
mtofile.Parameter
filemay also be astd::string_vieworconst char*.
-
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.
-
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)#
-
enum class stx : u16#
-
enumerator none = 0#
-
enumerator size = STATX_SIZE#
-
enumerator all = STATX_ALL#
-
enumerator atime = STATX_ATIME#
-
enumerator basic = STATX_BASIC_STATS#
-
enumerator mtime = STATX_MTIME#
-
enumerator ctime = STATX_CTIME#
-
enumerator btime = STATX_BTIME#
-
enumerator blocks = STATX_BLOCKS#
-
enumerator group = STATX_GID#
-
enumerator user = STATX_UID#
-
enumerator ino = STATX_INO#
-
enumerator mode = STATX_MODE#
-
enumerator type = STATX_TYPE#
-
enumerator nlink = STATX_NLINK#
-
enumerator none = 0#
-
class statux#
Wrapper around
statxfor doing selectivestatretrieval.-
statux::statux(std::string_view path, stx mask = stx::basic)#
Constructor accepting a path and mask bit-set.
-
std::chrono::time_point<std::chrono::file_clock> atime() const#
The time of the files’ last access.
-
std::chrono::time_point<std::chrono::file_clock> ctime() const#
The time of the files’ last access change (to its’ metadata).
-
std::chrono::time_point<std::chrono::file_clock> mtime() const#
The time of the files’ last modification (of its’ contents).
-
std::chrono::time_point<std::chrono::file_clock> btime() const#
The time of the files’ birth/creation.
-
ino_t ino() const#
The files’ index node number.
-
nlink_t nlink() const#
The number of hard links pointing to the file.
-
dev_t rdev() const#
If the file is a block or character special, this holds the device ID of said device.
-
dev_t dev() const#
The ID of the device containing the file.
-
statux::statux(std::string_view path, stx mask = stx::basic)#