File status class that wraps stat system type.
public stat_typeusing nlink_type = ::nlink_tHard link count type (integer).
using block_count_type = ::blkcnt_tBlock count type (integer).
using block_size_type = ::blksize_tBlock size type (integer).
using time_point = clock_type::time_pointClock time point type.
using clock_type = std::chrono::system_clockClock type used in the methods of this class.
last_status_changed() const -> time_pointGet time of last status change.
last_modified() const -> time_pointGet time of last modification.
last_accessed() const -> time_pointGet time of last access.
update(fd_type fd) -> file_status &
Get file status for file descriptor fd.
update(const char * filename, path_flag flags = path_flag(0)) -> file_status &
Get file status for file filename.
update(fd_type dir, const char * filename, path_flag flags = path_flag(0)) -> file_status &
Get file status for file filename located in directory specified by file descriptor dir.
exists() const -> boolReturn true, if the file exists.
group() const -> gid_typeGet ID of the group that owns the file.
owner() const -> uid_typeGet ID of the user that owns the file.
mode() const -> file_modeGet file mode bits.
num_links() const -> nlink_typeGet the number of hard links.
this_device() const -> device_typeGet device ID (if the file is a device).
device() const -> device_typeGet ID of the device that contains the file.
num_blocks() const -> block_count_typeGet the number of 512 byte blocks allocated for the file.
preferred_block_size() const -> block_size_typeGet preferred block size in bytes.
block_size() const -> block_size_typeGet file block size in bytes.
size() const -> offset_typeGet file size in bytes.
is_pipe() const -> boolReturns true, if file is a pipe.
is_character_device() const -> boolReturns true, if file is a character device.
is_directory() const -> boolReturns true, if file is a directory.
is_block_device() const -> boolReturns true, if file is a block device.
is_symbolic_link() const -> boolReturns true, if file is a symbolic link.
is_socket() const -> boolReturns true, if file is a unix domain socket.
is_regular() const -> boolReturns true, if file is regular.
type() const -> file_typeGet file type.
file_status(fd_type fd)explicit
Construct file status for file descriptor fd.
file_status(fd_type dir, const char * filename, path_flag flags = path_flag(0))
Construct file status for file filename located in directory specified by file descriptor dir.
file_status(const char * filename, path_flag flags = path_flag(0))explicit
Construct file status for file filename.
file_status()Print file status for debugging (the format is similar to ls(1)).
operator<<(std::ostream & out, const file_status & rhs) -> std::ostream &Print file status for debugging (the format is similar to ls(1)).