Ark Server API (ASA) - Wiki
|
#include <GenericPlatformFile.h>
Classes | |
class | FDirectoryStatVisitor |
class | FDirectoryVisitor |
class | IFileServerMessageHandler |
Public Types | |
typedef TFunctionRef< bool(const TCHAR *, bool) | FDirectoryVisitorFunc) |
typedef TFunctionRef< bool(const TCHAR *, const FFileStatData &) | FDirectoryStatVisitorFunc) |
Static Public Member Functions | |
static IPlatformFile & | GetPlatformPhysical () |
static const TCHAR * | GetPhysicalTypeName () |
File I/O Interface
Definition at line 207 of file GenericPlatformFile.h.
typedef TFunctionRef<bool(const TCHAR*, const FFileStatData&) IPlatformFile::FDirectoryStatVisitorFunc) |
File and directory visitor function that takes all the stat data
Definition at line 398 of file GenericPlatformFile.h.
typedef TFunctionRef<bool(const TCHAR*, bool) IPlatformFile::FDirectoryVisitorFunc) |
File and directory visitor function that takes only the name
Definition at line 381 of file GenericPlatformFile.h.
|
inlinevirtual |
Destructor.
Definition at line 215 of file GenericPlatformFile.h.
|
inlinevirtual |
Identifies any platform specific paths that are guaranteed to be local (i.e. cache, scratch space)
Definition at line 276 of file GenericPlatformFile.h.
Definition at line 284 of file GenericPlatformFile.h.
|
virtual |
Converts passed in filename to use an absolute path (for reading).
Filename | filename to convert to use an absolute path, safe to pass in already using absolute path |
Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Converts passed in filename to use an absolute path (for writing)
Filename | filename to convert to use an absolute path, safe to pass in already using absolute path |
Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Copy a file or a hierarchy of files (directory).
DestinationDirectory | Target path (either absolute or relative) to copy to - always a directory! (e.g. "/home/dest/"). |
Source | Source file (or directory) to copy (e.g. "/home/source/stuff"). |
bOverwriteAllExisting | Whether to overwrite everything that exists at target |
Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Copy a file. This will fail if the destination file already exists.
To | File to copy to. |
From | File to copy from. |
ReadFlags | Source file read options. |
WriteFlags | Destination file write options. |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Create a directory and return true if the directory was created or already existed.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Create a directory, including any parent directories and return true if the directory was created or already existed.
Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.
Delete a directory and return true if the directory was deleted or otherwise does not exist.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Delete all files and subdirectories in a directory, then delete the directory itself
Directory | The directory to delete. |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Delete a file and return true if the file exists. Will not delete read only files.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Return true if the directory exists.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Checks to see if this file system creates publicly accessible files
Definition at line 603 of file GenericPlatformFile.h.
Return true if the file exists.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Return the size of the file, or -1 if it doesn't exist.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Finds all the files within the given directory, with optional file extension filter
Directory | The directory to iterate the contents of |
FileExtension | If FileExtension is NULL, or an empty string "" then all files are found. Otherwise FileExtension can be of the form .EXT or just EXT and only files with that extension will be returned. |
Reimplemented in FCachedReadPlatformFile.
|
virtual |
Finds all the files within the directory tree, with optional file extension filter
Directory | The starting directory to iterate the contents. This function explores subdirectories |
FileExtension | If FileExtension is NULL, or an empty string "" then all files are found. Otherwise FileExtension can be of the form .EXT or just EXT and only files with that extension will be returned. |
Reimplemented in FCachedReadPlatformFile.
Return the last access time of a file. Returns FDateTime::MinValue() on failure
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
pure virtual |
Gets the platform file wrapped by this file.
Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Gets this platform file type name.
Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Returns the name of the physical platform file type.
|
static |
Physical file system of the platform, never wrapped.
|
pure virtual |
Return the stat data for the given file or directory. Check the FFileStatData::bIsValid member before using the returned data
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Return the modification time of a file. Returns FDateTime::MinValue() on failure
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC). Returns FDateTime::MinValue() on failure
|
virtual |
|
pure virtual |
Initializes platform file.
Inner | Platform file to wrap by this file. |
CmdLine | Command line to parse. |
Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Performs initialization of the platform file after the project path has been set.
Definition at line 261 of file GenericPlatformFile.h.
Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this
Definition at line 256 of file GenericPlatformFile.h.
Performs initialization of the platform file after the new async IO has been enabled
Definition at line 271 of file GenericPlatformFile.h.
Return true if the file is read only.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Returns whether the sandbox is enabled or not
Definition at line 231 of file GenericPlatformFile.h.
Return true if the file is a symbolic link
Definition at line 322 of file GenericPlatformFile.h.
|
pure virtual |
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 |
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call 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 (see FDirectoryVisitor::Visit for the signature) |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call the Visit function of the visitor once for each file or directory in a directory tree. This function explores subdirectories.
Directory | The directory to iterate the contents of, recursively. |
Visitor | Visitor to call for each element of the directory and each element of all subdirectories. |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call the Visit function of the visitor once for each file or directory in a directory tree. This function explores subdirectories.
Directory | The directory to iterate the contents of, recursively. |
Visitor | Visitor to call for each element of the directory and each element of all subdirectories (see FDirectoryVisitor::Visit for the signature). |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
pure virtual |
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 |
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call 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 (see FDirectoryStatVisitor::Visit for the signature) |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call the Visit function of the visitor once for each file or directory in a directory tree. This function explores subdirectories.
Directory | The directory to iterate the contents of, recursively. |
Visitor | Visitor to call for each element of the directory and each element of all subdirectories. |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
virtual |
Call the Visit function of the visitor once for each file or directory in a directory tree. This function explores subdirectories.
Directory | The directory to iterate the contents of, recursively. |
Visitor | Visitor to call for each element of the directory and each element of all subdirectories (see FDirectoryStatVisitor::Visit for the signature). |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
inlinevirtual |
Build an in memory unique pak file from a subset of files in this pak file
Definition at line 266 of file GenericPlatformFile.h.
Attempt to move a file. Return true if successful. Will not overwrite existing files.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Open a file for async reading. This call does not hit the disk or block.
Filename | file to be opened |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
inlinevirtual |
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. |
Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Definition at line 445 of file GenericPlatformFile.h.
|
pure virtual |
Attempt to open a file for reading.
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. |
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
inlinevirtual |
|
pure virtual |
Attempt to open a file for writing. If successful will return a non-nullptr pointer. Close the file by delete'ing the handle.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
inlinevirtual |
Sends a message to the file server, and will block until it's complete. Will return immediately if the file manager doesn't support talking to a server.
Message | The string message to send to the server |
Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.
Definition at line 592 of file GenericPlatformFile.h.
|
inlinevirtual |
Controls if the pak precacher should process precache requests. Requests below this threshold will not get precached. Without this throttle, quite a lot of memory can be consumed if the disk races ahead of the CPU.
MinPriority | the minimum priority at which requests will get precached |
Reimplemented in FCachedReadPlatformFile, and FLoggedPlatformFile.
Definition at line 434 of file GenericPlatformFile.h.
Sets file system to create publicly accessible files or not
bCreatePublicFiles | true to set the file system to create publicly accessible files |
Definition at line 613 of file GenericPlatformFile.h.
|
pure virtual |
Sets the platform file wrapped by this file.
Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
pure virtual |
Attempt to change the read only status of a file. Return true if successful.
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Set whether the sandbox is enabled or not
bInEnabled | true to enable the sandbox, false to disable it |
Definition at line 222 of file GenericPlatformFile.h.
|
pure virtual |
Sets the modification time of a file
Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
|
inlinevirtual |
Checks if this platform file should be used even though it was not asked to be. i.e. pak files exist on disk so we should use a pak file
Reimplemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.
Definition at line 240 of file GenericPlatformFile.h.
Platform file can override this to get a regular tick from the engine
Definition at line 293 of file GenericPlatformFile.h.