8#ifndef HPP_ALIB_CAMP_FILE_FSCANNER
9#define HPP_ALIB_CAMP_FILE_FSCANNER 1
18#if !defined(ALIB_FILES_FORCE_STD_SCANNER)
19# define ALIB_FILES_FORCE_STD_SCANNER 0
22#if defined(ALIB_FILES_SCANNER_IMPL)
23# error "Symbol ALIB_FILES_SCANNER_IMPL must not be set from outside! Use ALIB_FILES_FORCE_STD_SCANNER."
26#define ALIB_FILES_SCANNER_STDFS 1
27#define ALIB_FILES_SCANNER_POSIX 2
29#if ( ( defined(__GLIBCXX__) && !defined(__MINGW32__) ) \
30 || defined(__APPLE__) \
31 || defined(__ANDROID_NDK__) ) && !ALIB_FILES_FORCE_STD_SCANNER
32# define ALIB_FILES_SCANNER_IMPL ALIB_FILES_SCANNER_POSIX
34# define ALIB_FILES_SCANNER_IMPL ALIB_FILES_SCANNER_STDFS
39namespace alib {
namespace files {
65 static constexpr unsigned int InfiniteRecursion = (std::numeric_limits<unsigned int>::max)();
141 bool crossFileSystems =
true,
142 bool includeArtificialFS =
false )
275 std::vector<ResultsPaths>& resultPaths,
281 std::vector<ResultsPaths>& resultPaths
295 std::vector<ResultsPaths>& resultPaths )
Qualities
Per-entry information about how a node was scanned.
TLock & GetLock() const noexcept
#define IF_ALIB_THREADS(...)
String DBG_FILES_SCAN_VERBOSE_LOG_FORMAT
std::shared_ptr< FFilter > SPFileFilter
A shared pointer to a filter.
ALIB_API FInfo::Qualities ScanFiles(FTree &tree, ScanParameters ¶meters, std::vector< ResultsPaths > &resultPaths, SharedLock *lock)
strings::TString< character > String
Type alias in namespace alib.
FTree::Cursor Node
The node in the tree representing this path.
ResultsPaths(const lang::system::PathString &realPath, FTree::Cursor node, bool existed)
lang::system::Path RealPath
The 'real' absolute path to the node (no symbolic links included).
Input parameters to function ScanFiles.
Path StartPath
The path to be scanned.
SymbolicLinks LinkTreatment
Denotes how symbolic links are treated.
unsigned int MaxDepth
The maximum recursion depth. Defaults to InfiniteRecursion.
static constexpr unsigned int InfiniteRecursion
Denotes 'infinite' recursion if set to field MaxDepth.
bool RemoveEmptyDirectories
SPFileFilter DirectoryFilterPostRecursion
ScanParameters(const lang::system::PathString &startPath, SymbolicLinks linkTreatment=SymbolicLinks::RECURSIVE, unsigned int maxDepth=InfiniteRecursion, bool crossFileSystems=true, bool includeArtificialFS=false)
SPFileFilter DirectoryFilterPreRecursion
SymbolicLinks
Options for processing symbolic links.
@ DONT_RESOLVE
Demands not to resolve symbolic links in any way.
@ RESOLVE_BUT_DONT_FOLLOW