File
Summary
| Members | Descriptions |
|---|---|
class URH_RemoteFileSubsystem | File Subsystem used for file API calls. |
class URH_RemoteFileSubsystem
class URH_RemoteFileSubsystem
: public URH_GameInstanceSubsystemPlugin
File Subsystem used for file API calls.
Summary
| Members | Descriptions |
|---|---|
public virtual void Initialize() | Initialize the subsystem. |
public virtual void Deinitialize() | Safely tears down the subsystem. |
public inline virtual void UploadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,const FRH_GenericSuccessWithErrorBlock Delegate) | Upload a local file to the remote file storage. |
public virtual void UploadFromFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,bool bStreamFile,const FRH_GenericSuccessWithErrorBlock Delegate) | Upload a local file to the remote file storage. |
public virtual void UploadFromStream(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,TSharedRef< FArchive, ESPMode::ThreadSafe > Stream,const FRH_GenericSuccessWithErrorBlock Delegate) | Upload a local file to the remote file storage. |
public virtual void DeleteFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_GenericSuccessWithErrorBlock Delegate) | Delete a file from remote file storage. |
public inline virtual void DownloadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,const FRH_GenericSuccessWithErrorBlock Delegate) | Download a remote file to local file storage. |
public inline virtual void DownloadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_FileDownloadDelegate Delegate) | Download a remote file to memory. |
public virtual void DownloadToFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,bool bStreamFile,const FRH_GenericSuccessWithErrorBlock Delegate) | Download a remote file to local file storage. |
public virtual void DownloadToMemory(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_FileDownloadDelegate Delegate) | Download a remote file to memory. |
public virtual void DownloadToStream(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,TSharedRef< FArchive > Stream,const FRH_GenericSuccessWithErrorBlock Delegate) | Download a remote file to local file storage. |
public virtual void DownloadAllFiles(const FRH_RemoteFileApiDirectory & Directory,const FString & LocalDirectory,bool bUseCachedList,const FRH_FileDirectoryDownloadDelegateBlock Delegate) | Downloads all discoverable files in a remote directory to a local file directory. |
public virtual void LookupFileList(const FRH_RemoteFileApiDirectory & Directory,const FRH_GenericSuccessWithErrorBlock Delegate) | List the available remote files for an entity from the API and store results in cache. |
public inline const TMap< FRH_RemoteFileApiDirectory](Common.md#structFRH__RemoteFileApiDirectory), [FRHAPI_FileListResponse> &GetFileListCache() const | Get the entire file list cache. |
public inline virtual bool ListFiles(const FRH_RemoteFileApiDirectory & Directory,FRHAPI_FileListResponse & OutFileList) | List the available remote files for an entity from the cache. |
protected TMap< FRH_RemoteFileApiDirectory](Common.md#structFRH__RemoteFileApiDirectory), [FRHAPI_FileListResponse>FileListCache | |
protected virtual void DownloadFileList(const FRH_RemoteFileApiDirectory & Directory,const TArray< FString > & RemoteFileNames,const FString & LocalDirectory,const FRH_FileDirectoryDownloadDelegateBlock Delegate) | Downloads all discoverable files in a remote directory to a local file directory. |
Members
public virtual void Initialize()
Initialize the subsystem.
public virtual void Deinitialize()
Safely tears down the subsystem.
public inline virtual void UploadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,const FRH_GenericSuccessWithErrorBlock Delegate)
Upload a local file to the remote file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage. -
LocalFilePathThe path of the file on the local storage to upload. -
DelegateThe delegate to call when the operation completes.
public virtual void UploadFromFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,bool bStreamFile,const FRH_GenericSuccessWithErrorBlock Delegate)
Upload a local file to the remote file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage. -
LocalFilePathThe path of the file on the local storage to upload. -
bStreamFileIf true, the file will be streamed from disk instead of loaded into memory before upload. -
DelegateThe delegate to call when the operation completes.
public virtual void UploadFromStream(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,TSharedRef< FArchive, ESPMode::ThreadSafe > Stream,const FRH_GenericSuccessWithErrorBlock Delegate)
Upload a local file to the remote file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage. -
StreamAn archive to stream the file from. The stream is not closed after the operation completes. -
DelegateThe delegate to call when the operation completes.
public virtual void DeleteFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_GenericSuccessWithErrorBlock Delegate)
Delete a file from remote file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage. -
DelegateThe delegate to call when the operation completes.
public inline virtual void DownloadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,const FRH_GenericSuccessWithErrorBlock Delegate)
Download a remote file to local file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage to download. -
LocalFilePathThe path of the file on the local storage to save to. -
DelegateThe delegate to call when the operation completes.
public inline virtual void DownloadFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_FileDownloadDelegate Delegate)
Download a remote file to memory.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage to download. -
DelegateThe delegate to call when the operation completes.
public virtual void DownloadToFile(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FString & LocalFilePath,bool bStreamFile,const FRH_GenericSuccessWithErrorBlock Delegate)
Download a remote file to local file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage to download. -
LocalFilePathThe path of the file on the local storage to save to. -
DelegateThe delegate to call when the operation completes.
public virtual void DownloadToMemory(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,const FRH_FileDownloadDelegate Delegate)
Download a remote file to memory.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage to download. -
DelegateThe delegate to call when the operation completes.
public virtual void DownloadToStream(const FRH_RemoteFileApiDirectory & Directory,const FString & RemoteFileName,TSharedRef< FArchive > Stream,const FRH_GenericSuccessWithErrorBlock Delegate)
Download a remote file to local file storage.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
RemoteFileNameThe name of the file on the remote storage to download. -
StreamThe stream to write to. The stream is not closed after the operation completes. -
DelegateThe delegate to call when the operation completes.
public virtual void DownloadAllFiles(const FRH_RemoteFileApiDirectory & Directory,const FString & LocalDirectory,bool bUseCachedList,const FRH_FileDirectoryDownloadDelegateBlock Delegate)
Downloads all discoverable files in a remote directory to a local file directory.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
LocalDirectoryThe path of the directory on the local storage to save to. -
bUseCachedListIf true, use the cached file list instead of fetching a new one. -
DelegateThe delegate to call when the operation completes.
public virtual void LookupFileList(const FRH_RemoteFileApiDirectory & Directory,const FRH_GenericSuccessWithErrorBlock Delegate)
List the available remote files for an entity from the API and store results in cache.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
DelegateThe delegate to call when the operation completes.
public inline const TMap< FRH_RemoteFileApiDirectory](Common.md#structFRH__RemoteFileApiDirectory), [FRHAPI_FileListResponse> &GetFileListCache() const
Get the entire file list cache.
public inline virtual bool ListFiles(const FRH_RemoteFileApiDirectory & Directory,FRHAPI_FileListResponse & OutFileList)
List the available remote files for an entity from the cache.
Parameters
DirectoryThe directory of the file on the remote storage.
protected TMap< FRH_RemoteFileApiDirectory](Common.md#structFRH__RemoteFileApiDirectory), [FRHAPI_FileListResponse>FileListCache
protected virtual void DownloadFileList(const FRH_RemoteFileApiDirectory & Directory,const TArray< FString > & RemoteFileNames,const FString & LocalDirectory,const FRH_FileDirectoryDownloadDelegateBlock Delegate)
Downloads all discoverable files in a remote directory to a local file directory.
Parameters
-
DirectoryThe directory of the file on the remote storage. -
LocalDirectoryThe path of the directory on the local storage to save to. -
bUseCachedListIf true, use the cached file list instead of fetching a new one. -
DelegateThe delegate to call when the operation completes.