UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IPlatformFile::FDirectoryStatVisitor Class Referenceabstract

#include <GenericPlatformFile.h>

+ Inheritance diagram for IPlatformFile::FDirectoryStatVisitor:

Public Member Functions

virtual ~FDirectoryStatVisitor ()
 
virtual bool ShouldVisitLeafPathname (FStringView LeafPathname)
 
virtual bool Visit (const TCHAR *FilenameOrDirectory, const FFileStatData &StatData)=0
 
CORE_API bool CallShouldVisitAndVisit (const TCHAR *FilenameOrDirectory, const FFileStatData &StatData)
 

Detailed Description

Base class for file and directory visitors that take all the stat data.

Constructor & Destructor Documentation

◆ ~FDirectoryStatVisitor()

virtual IPlatformFile::FDirectoryStatVisitor::~FDirectoryStatVisitor ( )
inlinevirtual

Member Function Documentation

◆ CallShouldVisitAndVisit()

bool IPlatformFile::FDirectoryStatVisitor::CallShouldVisitAndVisit ( const TCHAR FilenameOrDirectory,
const FFileStatData StatData 
)

Helper function for receivers of FDirectoryStatVisitor. Enforces the contract for whether Visit should be called after calling ShouldVisitLeafPathName.

◆ ShouldVisitLeafPathname()

virtual bool IPlatformFile::FDirectoryStatVisitor::ShouldVisitLeafPathname ( FStringView  LeafPathname)
inlinevirtual

Called with the LeafPathname (FullPath == Path/LeafPathname, LeafPathname == BaseName.Extension) before calling Visit. If it returns true, Visit will be called on the path, otherwise Visit will be skipped, and the return value of Visit is treated as true (continue iterating). Called both for directories and files.

◆ Visit()

virtual bool IPlatformFile::FDirectoryStatVisitor::Visit ( const TCHAR FilenameOrDirectory,
const FFileStatData StatData 
)
pure virtual

Callback for a single file or a directory in a directory iteration.

Parameters
FilenameOrDirectoryIf bIsDirectory is true, this is a directory (with no trailing path delimiter), otherwise it is a file name.
StatDataThe stat data for the file or directory.
Returns
true if the iteration should continue.

Implemented in UE::PakFile::Private::FPreventDuplicatesStatVisitor, FDirectoryStatVisitorFuncWrapper, FLoggedPlatformFile::FLogStatVisitor, and FSandboxStatVisitor.


The documentation for this class was generated from the following files: