Navigation
API > API/Runtime > API/Runtime/NetworkFile
Inheritance Hierarchy
- IPlatformFile
- FSelfRegisteringExec
- FNetworkPlatformFile
- FStreamingNetworkPlatformFile
References
| Module | NetworkFile |
| Header | /Engine/Source/Runtime/NetworkFile/Public/NetworkPlatformFile.h |
| Include | #include "NetworkPlatformFile.h" |
Syntax
class FNetworkPlatformFile :
public IPlatformFile,
public FSelfRegisteringExec
Remarks
Wrapper to redirect the low level file system to a server
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bHasLoadedDDCDirectories | This is true after the DDC directories have been loaded from the DDC system | |
| bool | bIsUsable | ||
| TSet< FString > | CachedLocalFiles | This keeps track of what files have been "EnsureFileIsLocal'd" | |
| EConnectionFlags | ConnectionFlags | The connection flags are passed to the server during GetFileList the server may cache them | |
| int32 | FileServerPort | ||
| float | HeartbeatFrequency | Frequency to send heartbeats to server in seconds set to negative number to disable. | |
| IPlatformFile * | InnerPlatformFile | The file interface to read/write local files with | |
| TArray< FString > | LocalDirectories | Set of directories that should use the local filesystem | |
| FCriticalSection | LocalDirectoriesCriticalSection | ||
| FString | ServerEngineDir | The server engine dir | |
| FString | ServerEnginePlatformExtensionsDir | The server engine platform extensions dir | |
| FServerTOC | ServerFiles | This is the "TOC" of the server | |
| FString | ServerProjectDir | The server game dir | |
| FString | ServerProjectPlatformExtensionsDir | The server project platform extensions dir | |
| FCriticalSection | SynchronizationObject | ||
| int32 | TotalFilesFoundLocally | ||
| int32 | TotalFilesSynced | ||
| double | TotalNetworkSyncTime | ||
| double | TotalTimeSpentInUnsolicitedPackages | ||
| int32 | TotalUnsolicitedPackages | ||
| double | TotalWaitForAsyncUnsolicitedPackages | ||
| double | TotalWriteTime | Some stats for messuring network platform file performance | |
| int32 | UnsolicitedPackagesHits | ||
| int32 | UnsolicitedPackageWaits |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ConvertServerFilenameToClientFilename
(
FString& FilenameToConvert |
Convert the given filename from the server to the client version of it NOTE: Potentially modifies the input FString!!!! | |
| void | |||
| void | FillGetFileList
(
FNetworkFileArchive& Payload |
||
| void | GetFileInfo
(
const TCHAR* Filename, |
||
| const TCHAR * | GetTypeName () |
||
| FString | |||
| bool | InitializeInternal
(
IPlatformFile* Inner, |
Initialize network platform file give the specified host IP | |
| bool | IsUsable () |
||
| void | MakeStandardNetworkFilename
(
FString& Filename |
Does normal path standardization, and also any extra modifications to make string comparisons against the internal directory list work properly. | |
| void | OnFileUpdated
(
const FString& LocalFilename |
||
| void | Send a heartbeat message to the file server. | ||
| void | ProcessServerCachedFilesResponse
(
FArrayReader& InReponse, |
||
| void | ProcessServerInitialResponse
(
FArrayReader& InResponse, |
||
| bool | ReceiveResponse
(
TArray< uint8 >& Out |
||
| bool | SendPayloadAndReceiveResponse
(
TArray< uint8 >& In, |
||
| bool | SendReadMessage
(
uint8* Destination, |
||
| bool | SendWriteMessage
(
const uint8* Source, |
Overridden from IPlatformFile
| Type | Name | Description | |
|---|---|---|---|
| FString | ConvertToAbsolutePathForExternalAppForRead
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for reading). | |
| FString | ConvertToAbsolutePathForExternalAppForWrite
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for writing) | |
| bool | CopyFile
(
const TCHAR* To, |
Copy a file. This will fail if the destination file already exists. | |
| bool | CreateDirectory
(
const TCHAR* Directory |
Create a directory and return true if the directory was created or already existed. | |
| bool | CreateDirectoryTree
(
const TCHAR* Directory |
Create a directory, including any parent directories and return true if the directory was created or already existed. | |
| bool | DeleteDirectory
(
const TCHAR* Directory |
Delete a directory and return true if the directory was deleted or otherwise does not exist. | |
| bool | DeleteDirectoryRecursively
(
const TCHAR* Directory |
Delete all files and subdirectories in a directory, then delete the directory itself | |
| bool | DeleteFile
(
const TCHAR* Filename |
Delete a file and return true if the file exists. Will not delete read only files. | |
| bool |
DirectoryExists
(
const TCHAR* Directory |
Return true if the directory exists. | |
| bool | FileExists
(
const TCHAR* Filename |
Return true if the file exists. | |
| int64 | FileSize
(
const TCHAR* Filename |
Return the size of the file, or -1 if it doesn't exist. | |
| FDateTime | GetAccessTimeStamp
(
const TCHAR* Filename |
Return the last access time of a file. | |
| FString | GetFilenameOnDisk
(
const TCHAR* Filename |
For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem | |
| IPlatformFile * | Gets the platform file wrapped by this file. | ||
| const TCHAR * | GetName () |
Gets this platform file type name. | |
| FFileStatData | GetStatData
(
const TCHAR* FilenameOrDirectory |
Return the stat data for the given file or directory. | |
| FDateTime | GetTimeStamp
(
const TCHAR* Filename |
Return the modification time of a file. | |
| void | GetTimeStampPair
(
const TCHAR* PathA, |
||
| bool | Initialize
(
IPlatformFile* Inner, |
Initializes platform file. | |
| void | Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this | ||
| bool | IsReadOnly
(
const TCHAR* Filename |
Return true if the file is read only. | |
| bool | IterateDirectory
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectoryRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| bool | IterateDirectoryStat
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| bool | MoveFile
(
const TCHAR* To, |
Attempt to move a file. Return true if successful. Will not overwrite existing files. | |
| IFileHandle * | OpenRead
(
const TCHAR* Filename, |
Attempt to open a file for reading. | |
| IFileHandle * | OpenWrite
(
const TCHAR* Filename, |
Attempt to open a file for writing. | |
| bool | SendMessageToServer
(
const TCHAR* Message, |
Sends a message to the file server, and will block until it's complete. | |
| void | SetLowerLevel
(
IPlatformFile* NewLowerLevel |
Sets the platform file wrapped by this file. | |
| bool | SetReadOnly
(
const TCHAR* Filename, |
Attempt to change the read only status of a file. Return true if successful. | |
| void | SetTimeStamp
(
const TCHAR* Filename, |
Sets the modification time of a file | |
| bool | ShouldBeUsed
(
IPlatformFile* Inner, |
Checks if this platform file should be used even though it was not asked to be. | |
| void | Tick () |
Platform file can override this to get a regular tick from the engine |
Overridden from FExec
| Type | Name | Description | |
|---|---|---|---|
| bool | Exec_Runtime
(
UWorld* InWorld, |
Implementation of Exec that is called on all targets where UE_ALLOW_EXEC_COMMANDS is true |
Constants
| Name | Description |
|---|---|
| BulkFileExtension | |
| ExpFileExtension | |
| FontFileExtension | |
| MP4Extension |