PS5FileSystem¶
Source:
Assets/UpscaleSDK/Platform/PS5/Saves/PS5FileSystem.cs
class PS5FileSystem¶
Represents a ps5 file system class.
Events¶
public event Action<int, string> OnReadError¶
Occurs when read error.
public event Action<int, string> OnWriteError¶
Occurs when write error.
public event Action<string> OnFileReadFinished¶
Occurs when file read finished.
public event Action<FileEntry[]> OnFilesFound¶
Occurs when files found.
Methods¶
public void Write(string fileName, string extension, string data)¶
Writes data to a file in the PS5 save data system.
Parameters
| Name | Description |
|---|---|
data |
The string data to be written to the file. |
public bool Read(string fileName, string extension)¶
Reads data from a file in the PS5 save data system. When the read operation is complete, the OnFileReadFinished event will be invoked with the file content.
Parameters
| Name | Description |
|---|---|
fileName |
The file name. |
extension |
The extension. |
Returns: True if the read operation was initiated successfully; otherwise, false.
public void StartFileSearch()¶
Starts a search for files in the PS5 save data system. When the search is complete, the OnFilesFound event will be invoked with the found files.
public static IEnumerator ReadCoroutine(int userId, DirName dirName, FileOps.FileOperationRequest fileRequest, FileOps.FileOperationResponse fileResponse)¶
Read coroutine.
Parameters
| Name | Description |
|---|---|
userId |
The user id. |
dirName |
The dir name. |
fileRequest |
The file request. |
fileResponse |
The file response. |