287 [[nodiscard]]
constexpr bool IsDirectory () const noexcept {
return int(
bits.Type) < 2; }
314 [[nodiscard]]
constexpr uint32_t
Owner () const noexcept {
return owner; }
316 [[nodiscard]]
constexpr uint32_t
Group () const noexcept {
return group; }
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
constexpr DateTime BDate() const noexcept
@ MARKER_TYPES_END
A marker for the last countable type. The rest are unused/errors.
@ DIRECTORY
Directory/folder.
@ CHARACTER
A character special file.
@ BLOCK
A block special file.
@ FIFO
A FIFO (also known as pipe) file.
constexpr DateTime MDate() const noexcept
void SetScanState(ScanStates v) noexcept
constexpr uint32_t Owner() const noexcept
void SetType(Types v) noexcept
constexpr uinteger Size() const noexcept
void SetCrossingFS() noexcept
Mark the entry as residing on a different filesystem than its parent.
const NString GetOwnerName() const
void SetArtificialFS() noexcept
Mark the entry as residing on an artificial filesystem.
constexpr uint32_t QtyHardLinks() const noexcept
void SetADate(DateTime v) noexcept
uinteger size
The file size. In case of a directory, this is 0.
FileStatus()
Default constructor.
constexpr bool IsCrossingFS() const noexcept
constexpr uint64_t PosixDevice() const noexcept
uint32_t group
The group id that owns the file.
constexpr bool IsSymbolicLink() const noexcept
void SetMDate(DateTime v) noexcept
constexpr Types Type() const noexcept
uint32_t owner
The user id that owns the file.
constexpr Permissions Perms() const noexcept
void SetTargetCrossingFS() noexcept
constexpr DateTime ADate() const noexcept
void SetSize(uinteger v) noexcept
constexpr uint32_t Group() const noexcept
FileStatus(Path &path, bool isCanonical=false)
Permissions
Permission flags. Compatible with POSIX definition.
@ MASK
All valid permission bits. Equivalent to all | set_uid | set_gid | sticky_bit.
@ GROUP_READ
Posix S_IRGRP: The file's user group has read permission.
@ OTHERS_ALL
Posix S_IRWXO: Other users have read, write, and execute/search permissions Equivalent to others_read...
@ GROUP_EXEC
Posix S_IXGRP: The file's user group has execute/search permission.
@ OTHERS_EXEC
Posix S_IXOTH: Other users have execute/search permission.
@ GROUP_WRITE
Posix S_IWGRP: The file's user group has write permission.
@ ALL
All users have read, write, and execute/search permissions Equivalent to owner_all | group_all | othe...
@ UNKNOWN
Unknown permissions (e.g., when not read, or filesystem does not support permissions).
@ OWNER_ALL
Posix S_IRWXU: File owner has read, write, and execute/search permissions Equivalent to owner_read | ...
@ OWNER_READ
Posix S_IRUSR: File owner has read permission.
@ STICKY_BIT
Posix S_ISVTX: Implementation-defined meaning, but POSIX XSI specifies that when set on a directory,...
@ SET_UID
Posix S_ISUID: Set user ID to file owner user ID on execution.
@ OWNER_EXEC
Posix S_IXUSR: File owner has execute/search permission.
@ SET_GID
Posix S_ISGID: Set group ID to file's user group ID on execution.
@ NONE
no permission bits are set
@ OWNER_WRITE
Posix S_IWUSR: File owner has write permission.
@ OTHERS_READ
Posix S_IROTH: Other users have read permission.
@ OTHERS_WRITE
Posix S_IWOTH: Other users have write permission.
@ GROUP_ALL
Posix S_IRWXG: The file's user group has read, write, and execute/search permissions Equivalent to gr...
void SetOwner(uint32_t v) noexcept
void SetPerms(Permissions v) noexcept
static constexpr TOwnerAndGroupID UnknownID
Constant value for owner and group IDs to denote that the field was not determined.
Bits bits
A bitfield encoding various information.
const NString GetGroupName() const
constexpr bool TargetIsArtificialFS() const noexcept
void SetBDate(DateTime v) noexcept
constexpr bool TargetIsCrossingFS() const noexcept
constexpr DateTime CDate() const noexcept
uint32_t TOwnerAndGroupID
Type definition for owner and group ids.
ScanStates Update(Path &path, bool isCanonical=false)
uint32_t qtyHardLinks
The number of hard links to the file.
constexpr bool IsDirectory() const noexcept
void SetPosixDevice(uint64_t deviceCode) noexcept
constexpr ScanStates ScanState() const noexcept
void SetCDate(DateTime v) noexcept
constexpr bool IsArtificialFS() const noexcept
ScanStates
Per-entry information about how a node was scanned.
@ RECURSIVE
Follow symlink target strings.
@ STATS
Only stats (size, date, owner, etc.) read.
@ NO_ACCESS_DIR
Scanner failure due to limited access rights on a directory.
@ MAX_DEPTH_REACHED
Scanning stopped because maximum depth was reached.
@ RESOLVED
Read symlink target strings.
@ NO_ACCESS_SL
Scanner failure due to limited access rights on a symbolic link.
@ UNKNOWN_ERROR
Unknown scanner failure.
@ BROKEN_LINK
A symbolic link targets a non-existent file or directory.
@ NO_ACCESS_SL_TARGET
Scanner failure due to limited access rights on a symbolic link's target.
@ NOT_FOLLOWED
A symbolic link that targets a directory, but scan parameters specify not to follow.
@ NO_ACCESS
Scanner failure due to limited access rights.
@ NOT_EXISTENT
Set if a given start path does not exist.
void SetQtyHardlinks(uint32_t v) noexcept
void SetTargetArtificialFS() noexcept
Mark the entry as a symlink who's target is residing on an artificial filesystem.
void SetGroup(uint32_t v) noexcept
#define ALIB_ENUMS_MAKE_BITWISE(TEnum)
#define ALIB_ENUMS_MAKE_ITERABLE(TEnum, StopElement)
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
strings::TString< nchar > NString
Type alias in namespace #"%alib".
system::FileStatus FileStatus
Type alias in namespace #"%alib".
lang::uinteger uinteger
Type alias in namespace #"%alib".
time::DateTime DateTime
Type alias in namespace #"%alib".
A bitfield encoding various information.
bool IsArtificialFS
Denotes whether the file resides in an artificial filesystem.
bool TargetIsCrossingFS
Denotes whether a link points to a mount point.
ScanStates ScanState
The scan state.
bool IsCrossingFS
Denotes whether the file is a mount point.
bool TargetIsArtificialFS
Denotes whether a link points into an artificial filesystem.
Permissions Permission
The unix file-permissions.