UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FUnixFileMapper Class Reference

Public Member Functions

 FUnixFileMapper ()
 
FString GetPathComponent (const FString &Filename, int NumPathComponent)
 
int32 CountPathComponents (const FString &Filename)
 
bool MapFileRecursively (const FString &Filename, int PathComponentToLookFor, int MaxPathComponents, FString &ConstructedPath)
 
bool MapCaseInsensitiveFile (const FString &PossiblyWrongFilename, FString &ExistingFilename)
 
int32 OpenCaseInsensitiveRead (const FString &Filename, FString &MappedToFilename)
 

Detailed Description

A class to handle case insensitive file opening. This is a band-aid, non-performant approach, without any caching.

Constructor & Destructor Documentation

◆ FUnixFileMapper()

FUnixFileMapper::FUnixFileMapper ( )
inline

Member Function Documentation

◆ CountPathComponents()

int32 FUnixFileMapper::CountPathComponents ( const FString &  Filename)
inline

◆ GetPathComponent()

FString FUnixFileMapper::GetPathComponent ( const FString &  Filename,
int  NumPathComponent 
)
inline

◆ MapCaseInsensitiveFile()

bool FUnixFileMapper::MapCaseInsensitiveFile ( const FString &  PossiblyWrongFilename,
FString &  ExistingFilename 
)
inline

Tries to map a filename (one with a possibly wrong case) to one that exists.

Parameters
PossiblyWrongFilenameabsolute filename (that has possibly a wrong case)
ExistingFilenamefilename that exists (only valid to use if the function returned success).

◆ MapFileRecursively()

bool FUnixFileMapper::MapFileRecursively ( const FString &  Filename,
int  PathComponentToLookFor,
int  MaxPathComponents,
FString &  ConstructedPath 
)
inline

Tries to recursively find (using case-insensitive comparison) and open the file. The first file found will be opened.

Parameters
FilenameOriginal file path as requested (absolute)
PathComponentToLookForPart of path we are currently trying to find.
MaxPathComponentsMaximum number of path components (directories), i.e. how deep the path is.
ConstructedPathThe real (absolute) path that we have found so far
Returns
a handle opened with open()

◆ OpenCaseInsensitiveRead()

int32 FUnixFileMapper::OpenCaseInsensitiveRead ( const FString &  Filename,
FString &  MappedToFilename 
)
inline

Opens a file for reading, disregarding the case.

Parameters
Filenameabsolute filename
MappedToFilenameabsolute filename that we mapped the Filename to (always filled out on success, even if the same as Filename)

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