Skip to content

IReader

Source: Assets/UpscaleSDK/Core/Saves/Runtime/FileSystems/IReader.cs

interface IReader

Interface for a file reader.

Events

public event Action<int, string> OnReadError

Event triggered when an error occurs during a read operation. Error code may be presented as an integer or string.

public event Action<string> OnFileReadFinished

Event triggered when a file read operation is finished.

Methods

public bool Read(string fileName, string extension)

Reads a file from the file system.

Parameters

Name Description
fileName Name of the file to read.
extension Extension of the file to read.

Returns: True if the file was read successfully, false otherwise.