The entry type which is embedded in each tree node. Extends class FileStatus of ALib System mainly by DirectorySums, some extended entry information and a possible custom value.
Definition at line 16 of file ftvalue.hpp.
#include <ftvalue.hpp>
Inner Type Index: | |
| struct | DirectorySums |
| Recursively accumulated values for directories. More... | |
| struct | EIDirectory |
| struct | EISymLinkDir |
| struct | EISymLinkFile |
| struct | ExtendedEntryInfo |
| Base type to create pointers to different extended entry information structs. More... | |
Public Method Index: | |
| constexpr ExtendedEntryInfo * | GetExtendedInfo () const |
| CPathString & | GetLinkTarget () const noexcept |
| CPathString & | GetRealLinkTarget () const noexcept |
| constexpr void | SetExtendedInfo (ExtendedEntryInfo *extInfo) |
| void | SetLinkTarget (FTree &tree, const PathString &target, const PathString &realTarget) |
| constexpr void | SetSums (const DirectorySums &sums) const |
| constexpr DirectorySums & | Sums () const |
| Public Method Index: inherited from alib::system::FileStatus | |
| FileStatus () | |
| Default constructor. | |
| FileStatus (Path &path, bool isCanonical=false) | |
| constexpr DateTime | ADate () const noexcept |
| constexpr DateTime | BDate () const noexcept |
| constexpr DateTime | CDate () const noexcept |
| const NString | GetGroupName () const |
| const NString | GetOwnerName () const |
| constexpr uint32_t | Group () const noexcept |
| constexpr bool | IsArtificialFS () const noexcept |
| constexpr bool | IsCrossingFS () const noexcept |
| constexpr bool | IsDirectory () const noexcept |
| constexpr bool | IsSymbolicLink () const noexcept |
| constexpr DateTime | MDate () const noexcept |
| constexpr uint32_t | Owner () const noexcept |
| constexpr Permissions | Perms () const noexcept |
| constexpr uint64_t | PosixDevice () const noexcept |
| constexpr uint32_t | QtyHardLinks () const noexcept |
| constexpr ScanStates | ScanState () const noexcept |
| void | SetADate (DateTime v) noexcept |
| void | SetArtificialFS () noexcept |
| Mark the entry as residing on an artificial filesystem. | |
| void | SetBDate (DateTime v) noexcept |
| void | SetCDate (DateTime v) noexcept |
| void | SetCrossingFS () noexcept |
| Mark the entry as residing on a different filesystem than its parent. | |
| void | SetGroup (uint32_t v) noexcept |
| void | SetMDate (DateTime v) noexcept |
| void | SetOwner (uint32_t v) noexcept |
| void | SetPerms (Permissions v) noexcept |
| void | SetPosixDevice (uint64_t deviceCode) noexcept |
| void | SetQtyHardlinks (uint32_t v) noexcept |
| void | SetScanState (ScanStates v) noexcept |
| void | SetSize (uinteger v) noexcept |
| void | SetTargetArtificialFS () noexcept |
| Mark the entry as a symlink who's target is residing on an artificial filesystem. | |
| void | SetTargetCrossingFS () noexcept |
| void | SetType (Types v) noexcept |
| constexpr uinteger | Size () const noexcept |
| constexpr bool | TargetIsArtificialFS () const noexcept |
| constexpr bool | TargetIsCrossingFS () const noexcept |
| constexpr Types | Type () const noexcept |
| ScanStates | Update (Path &path, bool isCanonical=false) |
| ScanStates | Update (std::filesystem::path &path, bool isCanonical=false) |
Protected Field Index: | |
| void * | custom = nullptr |
| Pool-allocated custom data. | |
| const std::type_info * | dbgCustomType = nullptr |
| The custom type attached. Used for asserting misuse in debug-compilations. | |
| ExtendedEntryInfo * | extendedInfo = nullptr |
| Extended information, depending on the entry type. | |
| Protected Field Index: inherited from alib::system::FileStatus | |
| DateTime | aDate |
| DateTime | bDate |
| Bits | bits |
| A bitfield encoding various information. | |
| DateTime | cDate |
| uint64_t | device |
| uint32_t | group |
| The group id that owns the file. | |
| DateTime | mDate |
| uint32_t | owner |
| The user id that owns the file. | |
| uint32_t | qtyHardLinks |
| The number of hard links to the file. | |
| uinteger | size |
The file size. In case of a directory, this is 0. | |
| uinteger | symParent = 0 |
Additional Inherited Members | |
| Public Type Index: inherited from alib::system::FileStatus | |
| enum class | Permissions : uint32_t { NONE = 0 , UNKNOWN = 010000 , MASK = 07777 , ALL = 0777 , OWNER_READ = 0400 , OWNER_WRITE = 0200 , OWNER_EXEC = 0100 , OWNER_ALL = 0700 , GROUP_READ = 040 , GROUP_WRITE = 020 , GROUP_EXEC = 010 , GROUP_ALL = 070 , OTHERS_READ = 04 , OTHERS_WRITE = 02 , OTHERS_EXEC = 01 , OTHERS_ALL = 07 , SET_UID = 04000 , SET_GID = 02000 , STICKY_BIT = 01000 } |
| Permission flags. Compatible with POSIX definition. More... | |
| enum class | ScanStates : uint8_t { NONE = 0 , STATS = 1 , RESOLVED = 2 , MAX_DEPTH_REACHED = 3 , NOT_FOLLOWED = 4 , NOT_CROSSING_FS = 5 , NO_AFS = 6 , RECURSIVE = 7 , NO_ACCESS = 8 , NO_ACCESS_SL = 9 , NO_ACCESS_SL_TARGET =10 , NO_ACCESS_DIR =11 , BROKEN_LINK =12 , CIRCULAR_LINK =13 , DUPLICATE =14 , NOT_EXISTENT =15 , UNKNOWN_ERROR =16 } |
| Per-entry information about how a node was scanned. More... | |
| enum class | ScanStates3Letters : uint8_t { NONE = 0 , STATS = 1 , RESOLVED = 2 , MAX_DEPTH_REACHED = 3 , NOT_FOLLOWED = 4 , NOT_CROSSING_FS = 5 , NO_AFS = 6 , RECURSIVE = 7 , NO_ACCESS = 8 , NO_ACCESS_SL = 9 , NO_ACCESS_SL_TARGET =10 , NO_ACCESS_DIR =11 , BROKEN_LINK =12 , CIRCULAR_LINK =13 , DUPLICATE =14 , NOT_EXISTENT =15 , UNKNOWN_ERROR =16 } |
| using | TOwnerAndGroupID = uint32_t |
| Type definition for owner and group ids. | |
| enum class | TypeNames1Letter : uint8_t { DIRECTORY = 0 , SYMBOLIC_LINK_DIR = 1 , REGULAR = 2 , SYMBOLIC_LINK = 3 , BLOCK = 4 , CHARACTER = 5 , FIFO = 6 , SOCKET = 7 } |
| enum class | TypeNames2Letters : uint8_t { DIRECTORY = 0 , SYMBOLIC_LINK_DIR = 1 , REGULAR = 2 , SYMBOLIC_LINK = 3 , BLOCK = 4 , CHARACTER = 5 , FIFO = 6 , SOCKET = 7 } |
| enum class | TypeNames3Letters : uint8_t { DIRECTORY = 0 , SYMBOLIC_LINK_DIR = 1 , REGULAR = 2 , SYMBOLIC_LINK = 3 , BLOCK = 4 , CHARACTER = 5 , FIFO = 6 , SOCKET = 7 } |
| enum class | Types : uint8_t { DIRECTORY = 0 , SYMBOLIC_LINK_DIR = 1 , REGULAR = 2 , SYMBOLIC_LINK = 3 , BLOCK = 4 , CHARACTER = 5 , FIFO = 6 , SOCKET = 7 , UNKNOWN_OR_ERROR = 8 , MARKER_TYPES_END = 9 } |
| Public Static Field Index: inherited from alib::system::FileStatus | |
| static constexpr TOwnerAndGroupID | UnknownID = (std::numeric_limits<uint32_t>::max)() |
| Constant value for owner and group IDs to denote that the field was not determined. | |
|
protected |
Pool-allocated custom data.
Definition at line 154 of file ftvalue.hpp.
|
protected |
The custom type attached. Used for asserting misuse in debug-compilations.
Definition at line 158 of file ftvalue.hpp.
|
protected |
Extended information, depending on the entry type.
Definition at line 151 of file ftvalue.hpp.
|
inlinenodiscardconstexpr |
Retrieves the extended info object of this entry.
nullptr is returned. Definition at line 165 of file ftvalue.hpp.
|
inlinenodiscardnoexcept |
Retrieves the non-translated target of a symbolic link. In debug compilations, the method asserts that Type returns either SYMBOLIC_LINK or SYMBOLIC_LINK_DIR.
Definition at line 214 of file ftvalue.hpp.
|
inlinenodiscardnoexcept |
Retrieves the resolved target of a symbolic link. In debug compilations, the method asserts that Type returns either SYMBOLIC_LINK or SYMBOLIC_LINK_DIR.
Definition at line 226 of file ftvalue.hpp.
|
inlineconstexpr |
Sets the extended information object. As with all set functions, this method should only be used from certain code entities, like file scanners. If used, the object passed here has to be pool-allocated using public instance PoolAllocator Pool. The object will be freed with the deletion of the corresponding string tree node (respectively FTFile instance).
| extInfo | A pointer to the information object to use. |
Definition at line 173 of file ftvalue.hpp.
| void alib::filetree::FTValue::SetLinkTarget | ( | FTree & | tree, |
| const PathString & | target, | ||
| const PathString & | realTarget ) |
Stores the link targets in the extended information object created for symbolic links.
| tree | The tree that this object belongs to. |
| target | The target as stored in the symlink |
| realTarget | The translated, 'real' target path (if not broken). |
Definition at line 5 of file ftvalue.cpp.
|
inlineconstexpr |
Sets the sums of the extended info object of this entry.
| sums | The sums to set. |
Definition at line 191 of file ftvalue.hpp.
|
inlinenodiscardconstexpr |
Retrieves the directory sums of this directory or symbolic link to directory.
Definition at line 177 of file ftvalue.hpp.