Skip to main content

File

Summary

MembersDescriptions
class URH_RemoteFileSubsystemFile Subsystem used for file API calls.

class URH_RemoteFileSubsystem

class URH_RemoteFileSubsystem
: public URH_GameInstanceSubsystemPlugin

File Subsystem used for file API calls.

Summary

MembersDescriptions
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() constGet 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage.

  • LocalFilePath The path of the file on the local storage to upload.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage.

  • LocalFilePath The path of the file on the local storage to upload.

  • bStreamFile If true, the file will be streamed from disk instead of loaded into memory before upload.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage.

  • Stream An archive to stream the file from. The stream is not closed after the operation completes.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage to download.

  • LocalFilePath The path of the file on the local storage to save to.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage to download.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage to download.

  • LocalFilePath The path of the file on the local storage to save to.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage to download.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • RemoteFileName The name of the file on the remote storage to download.

  • Stream The stream to write to. The stream is not closed after the operation completes.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • LocalDirectory The path of the directory on the local storage to save to.

  • bUseCachedList If true, use the cached file list instead of fetching a new one.

  • Delegate The 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

  • Directory The directory of the file on the remote storage.

  • Delegate The 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

  • Directory The 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

  • Directory The directory of the file on the remote storage.

  • LocalDirectory The path of the directory on the local storage to save to.

  • bUseCachedList If true, use the cached file list instead of fetching a new one.

  • Delegate The delegate to call when the operation completes.