![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <FileSystem.h>
Inheritance diagram for BuildPatchServices::IFileSystem:Public Member Functions | |
| virtual | ~IFileSystem () |
| virtual bool | DirectoryExists (const TCHAR *DirectoryPath) const =0 |
| virtual bool | MakeDirectory (const TCHAR *DirectoryPath) const =0 |
| virtual bool | GetFileSize (const TCHAR *Filename, int64 &FileSize) const =0 |
| virtual bool | GetAttributes (const TCHAR *Filename, EAttributeFlags &Attributes) const =0 |
| virtual bool | GetTimeStamp (const TCHAR *Filename, FDateTime &TimeStamp) const =0 |
| virtual bool | SetReadOnly (const TCHAR *Filename, bool bIsReadOnly) const =0 |
| virtual bool | SetCompressed (const TCHAR *Filename, bool bIsCompressed) const =0 |
| virtual bool | SetExecutable (const TCHAR *Filename, bool bIsExecutable) const =0 |
| virtual TUniquePtr< FArchive > | CreateFileReader (const TCHAR *Filename, EReadFlags ReadFlags=EReadFlags::None) const =0 |
| virtual TUniquePtr< FArchive > | CreateFileWriter (const TCHAR *Filename, EWriteFlags WriteFlags=EWriteFlags::None) const =0 |
| virtual bool | LoadFileToString (const TCHAR *Filename, FString &Contents) const =0 |
| virtual bool | SaveStringToFile (const TCHAR *Filename, const FString &Contents) const =0 |
| virtual bool | DeleteFile (const TCHAR *Filename) const =0 |
| virtual bool | MoveFile (const TCHAR *FileDest, const TCHAR *FileSource) const =0 |
| virtual bool | CopyFile (const TCHAR *FileDest, const TCHAR *FileSource) const =0 |
| virtual bool | FileExists (const TCHAR *Filename) const =0 |
| virtual void | FindFiles (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension=nullptr) const =0 |
| virtual void | FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension=nullptr) const =0 |
| virtual void | ParallelFindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension=nullptr, EAsyncExecution AsyncExecution=EAsyncExecution::ThreadPool) const =0 |
| virtual int64 | GetAllowedBytesToWriteThrottledStorage (const TCHAR *DestinationPath=nullptr) const =0 |
The File System class is used for classes which require file access. It wraps Core IFileManager, and IPlatformFile. Also provides additional functionality missing from these classes at the time of writing. Using this wrapper allows dependants to be easily testable.
|
inlinevirtual |
|
pure virtual |
Copy a file.
| FileDest | The destination file path. |
| FileSource | The source file path. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Creates file reader archive.
| Filename | The filename for the request. |
| ReadFlags | The file open flags. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Creates file writer archive.
| Filename | The filename for the request. |
| WriteFlags | The file open flags. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Delete a file.
| Filename | The file to delete. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Checks whether a directory exists.
| DirectoryPath | The directory to check. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Checks whether a file exists.
| Filename | The file to check. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Finds all the files within the given directory, with optional file extension filter.
| FoundFiles | Receives the files that matched the optional FileExtension filter, or all files if none was specified. |
| Directory | The directory to iterate the contents of. |
| FileExtension | The extension to filter by, in the form of TEXT(".ext"). If null or empty string, all files are found. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Finds all the files within the given directory tree, with optional file extension filter.
| FoundFiles | Receives the files that matched the optional FileExtension filter, or all files if none was specified. |
| Directory | The directory to iterate the contents of. This function explores subdirectories. |
| FileExtension | The extension to filter by, in the form of TEXT(".ext"). If null or empty string, all files are found. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Returns the number of bytes that are currently allowed to be written to throttled write storage (if the platform has such restrictions)
| DestinationPath | If specified, the file system can optionally take into account the destination of the file to determine the current limit |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Get the attributes for a file.
| Filename | The filename for the request. |
| Attributes | Receives the attribute flags if successful. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Get the size of a file.
| Filename | The filename for the request. |
| FileSize | Receives the file size in bytes or INDEX_NONE if the file didn't exist. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Get modification time of a file.
| Filename | The filename for the request. |
| TimeStamp | Receives the time stamp if successful. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Load a file on disk into string.
| Filename | The filename for the request. |
| Contents | The contents of the file if successful. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Create a directory path.
| DirectoryPath | The directory path to create. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Move or rename a file.
| FileDest | The destination file path. |
| FileSource | The source file path. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Finds all the files within the given directory tree, with optional file extension filter. This version places each directory found on separate threads to improve large enumeration times.
| FoundFiles | Receives the files that matched the optional FileExtension filter, or all files if none was specified. |
| Directory | The directory to iterate the contents of. This function explores subdirectories. |
| FileExtension | The extension to filter by, in the form of TEXT(".ext"). If null or empty string, all files are found. |
| AsyncExecution | The threaded execution method to use, i.e. on Task Graph, Thread Pool, or a new thread per directory. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Save a string to file on disk.
| Filename | The filename for the request. |
| Contents | The string to save. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Set whether the file is compressed.
| Filename | The filename for the request. |
| bIsCompressed | The state to set. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Set whether the file is executable.
| Filename | The filename for the request. |
| bIsExecutable | The state to set. |
Implemented in BuildPatchServices::FFileSystem.
|
pure virtual |
Set whether the file is readonly.
| Filename | The filename for the request. |
| bIsReadOnly | The state to set. |
Implemented in BuildPatchServices::FFileSystem.