![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <WindowsPlatformFilePrivate.h>
Inheritance diagram for FWindowsPlatformFile:Classes | |
| class | FNormalizedDirectory |
| class | FNormalizedFilename |
Static Public Member Functions | |
| static void | NormalizeWindowsPath (FStringBuilderBase &Path, bool bIsFilename) |
| static FORCENOINLINE HANDLE | FindFirstFileWithWildcard (const TCHAR *Directory, WIN32_FIND_DATAW &OutData) |
Static Public Member Functions inherited from IPlatformFile | |
| static CORE_API IPlatformFile & | GetPlatformPhysical () |
| static CORE_API const TCHAR * | GetPhysicalTypeName () |
Additional Inherited Members | |
Public Types inherited from IPlatformFile | |
| enum class | EOpenReadFlags : uint8 { None = 0 , AllowWrite = 1 << 0 , AllowDelete = 1 << 1 , NoBuffering = 1 << 2 } |
| enum class | EOpenWriteFlags : uint8 { None = 0 , AllowRead = 1 << 0 , Append = 1 << 1 } |
| typedef TFunctionRef< bool(const TCHAR *, bool)> | FDirectoryVisitorFunc |
| typedef TFunctionRef< bool(const TCHAR *, const FFileStatData &)> | FDirectoryStatVisitorFunc |
| typedef TFunctionRef< bool(const TCHAR *, const FFileJournalData &)> | FDirectoryJournalVisitorFunc |
Windows File I/O implementation
Create a directory and return true if the directory was created or already existed.
Implements IPlatformFile.
Delete a directory and return true if the directory was deleted or otherwise does not exist.
Implements IPlatformFile.
Delete a file and return true if the file exists. Will not delete read only files.
Implements IPlatformFile.
Return true if the directory exists.
Implements IPlatformFile.
Return true if the file exists.
Implements IPlatformFile.
|
overridevirtual |
Return the data for the given path as with GetStatData, but report a FFileJournalData instead, which notably includes the FFileJournalFileHandle for the file/directory. Check the FFileJournalData::bIsValid member before using the returned data
Reimplemented from IPlatformFile.
|
overridevirtual |
Report the current end of the journal for the given volume, to be used as the StartingJournalEntry in FileJournalGetModifiedDirectories. If !FileJournalIsAvaiable for the given volume, sets OutEntryHandle to FileJournalEntryHandleInvalid. Returns EFileJournalResult::Success if successful, otherwise an error code and optionally a user-displayable explanation for the error code.
Reimplemented from IPlatformFile.
|
overridevirtual |
Return the maximum size of the FileJournal for the specified VolumeName, if available, zero otherwise. Optionally returns a user-displayable string for why the journal is not available and a severity level for the reason. VolumeName may be a VolumeName as returned by FileJournalGetVolumeName or any path to a file or directory on the Volume.
Reimplemented from IPlatformFile.
|
overridevirtual |
Return the VolumeSpecifier present in the given path. Returns empty string if path does not have a valid volume specifier for use by the FileJournal (e.g. some platforms do not support \paths for FileJournal).
Reimplemented from IPlatformFile.
|
overridevirtual |
Return whether FileJournal functionality is available on the current platform if VolumeName is nullptr or for the given Volume if VolumeName is non-null. Optionally returns a user-displayable string for why it is not available and a severity level for the reason. VolumeName may be a VolumeName as returned by FileJournalGetVolumeName or any path to a file or directory on the Volume.
Reimplemented from IPlatformFile.
|
overridevirtual |
Iterate the given directory as with IterateDirectoryStat, but report a FFileJournalData for each file and directory, which notably includes the FFileJournalFileHandle for the file/directory.
The paths returned as the first argument of the visitor function are the combined paths produced by combining the input directory with the relative path of the child file or directory.
If the FileJournal is unavailable on the current system the iteration will still succeed but the FFileJournalFileHandle for each child path will be set to FileJournalFileHandleInvalid.
If the FileJournal is available on the current system but not on the volume of the given directory, it is arbitrary whether the FFileJournalFileHandle will be validly set; if not valid they will be set to FileJournalFileHandleInvalid.
Reimplemented from IPlatformFile.
|
overridevirtual |
Query the FileJournal to find a list of all directories on the given volume with files that have been added, deleted, or modified in the specified time range. The beginning of the time range is specified by JournalIdOfStartingEntry and StartingJournalEntry, which came from FileJournalGetLatestEntry or a previous call to FileJournalReadModified. The end of the range is the latest modification on the volume. VolumeName can be the return value from FileJournalGetVolumeName, or any path on the desired volume.
The caller must provide the mapping from FFileJournalFileHandle to DirectoryName; the FFileJournalFileHandle for each Directory can be found from FileJournalGetFileData or FileJournalIterateDirectory.
Modified directories are appended into OutModifiedDirectories, and the next FileJournal entry to scan is written into OutNextJournalEntry.
Returns EFileJournalResult::Success if successful, otherwise an error code and optionally a user-displayable explanation for the error code. In an error case, partial results may still be written into the output.
Reimplemented from IPlatformFile.
Return the size of the file, or -1 if it doesn't exist.
Implements IPlatformFile.
|
static |
Return the last access time of a file. Returns FDateTime::MinValue() on failure
Implements IPlatformFile.
|
overridevirtual |
For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem
Implements IPlatformFile.
|
overridevirtual |
Return the stat data for the given file or directory. Check the FFileStatData::bIsValid member before using the returned data
Implements IPlatformFile.
Return the modification time of a file. Returns FDateTime::MinValue() on failure
Implements IPlatformFile.
|
overridevirtual |
Determine if the file has been downloaded from a web browser, based on platform-specific metadata.
| Filename | The file to check if it has a mark of the web. |
| OutSourceURL | An optional pointer to return a source url if available. |
Reimplemented from IPlatformFile.
Return true if the file is read only.
Implements IPlatformFile.
|
overridevirtual |
Return true if the file is a symbolic link
Reimplemented from IPlatformFile.
|
overridevirtual |
Call the Visit function of the visitor once for each file or directory in a single directory. This function does not explore subdirectories.
| Directory | The directory to iterate the contents of. |
| Visitor | Visitor to call for each element of the directory |
Implements IPlatformFile.
| bool FWindowsPlatformFile::IterateDirectoryCommon | ( | const TCHAR * | Directory, |
| const TFunctionRef< bool(const WIN32_FIND_DATAW &)> & | Visitor | ||
| ) |
|
overridevirtual |
Call the Visit function of the visitor once for each file or directory in a single directory. This function does not explore subdirectories.
| Directory | The directory to iterate the contents of. |
| Visitor | Visitor to call for each element of the directory |
Implements IPlatformFile.
Attempt to move a file. Return true if successful. Will not overwrite existing files.
Implements IPlatformFile.
|
static |
Convert from a valid Unreal Path to a canonical and strict-valid Windows Path. An Unreal Path may have either \ or / and may have empty directories (two / in a row), and may have .. and may be relative A canonical and strict-valid Windows Path has only \, does not have .., does not have empty directories, and is an absolute path, either \UNC or D:\ We need to use strict-valid Windows Paths when calling Windows API calls so that we can support the long-path prefix \?\
|
overridevirtual |
Open a file for async reading. This call does hit the disk; it is synchronous open.
| Filename | File to be mapped. This doesn't actually map anything, just opens the file. |
| OpenOptions | Allows specifying map to be writable via AllowWrite or be ReadOnly by deafault. |
Reimplemented from IPlatformFile.
|
overridevirtual |
Attempt to open a file for reading. Please consider using the new overload that takes EReadFlags instead of bools as parameters.
| Filename | file to be opened |
| bAllowWrite | (applies to certain platforms only) whether this file is allowed to be written to by other processes. This flag is needed to open files that are currently being written to as well. |
Implements IPlatformFile.
|
overridevirtual |
Open a file handle for reading.
| Filename | The file to be opened |
| Flags | Allows specialization of the open operation, |
Reimplemented from IPlatformFile.
|
overridevirtual |
Reimplemented from IPlatformFile.
|
overridevirtual |
Reimplemented from IPlatformFile.
|
overridevirtual |
Attempt to open a file for writing. If successful will return a non-nullptr pointer. Close the file by deleting the handle.
Implements IPlatformFile.
|
overridevirtual |
Attempt to change the platform-specific metadata that indicates if the file has been downloaded from a web browser.
| Filename | The file to change it's mark of the web status. |
| bNewStatus | New mark of the web status for the file. |
| InSourceURL | An optional pointer to a source url that will be applied if new status true. |
Reimplemented from IPlatformFile.
|
overridevirtual |
Attempt to change the read only status of a file. Return true if successful.
Implements IPlatformFile.
|
overridevirtual |
Sets the modification time of a file
Implements IPlatformFile.