IFS
Namespace: Shadop.Archmage.Sdk
File system abstraction for Archmage configuration loading.
public interface IFSMethods
Section titled “Methods”ReadAllBytes(String)
Section titled “ReadAllBytes(String)”Reads all bytes from the specified file.
Byte[] ReadAllBytes(string path)Parameters
Section titled “Parameters”path String
The file path.
Returns
Section titled “Returns”Byte[]
A byte array containing the contents of the file.
ReadAllBytesAsync(String, CancellationToken)
Section titled “ReadAllBytesAsync(String, CancellationToken)”Asynchronously reads all bytes from the specified file.
Task<Byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken)Parameters
Section titled “Parameters”path String
The file path.
cancellationToken CancellationToken
The token to monitor for cancellation requests.
Returns
Section titled “Returns”Task<Byte[]>
A task that represents the asynchronous read operation, wrapping the file contents as a byte array.
FileExists(String)
Section titled “FileExists(String)”Determines whether the specified file exists.
bool FileExists(string path)Parameters
Section titled “Parameters”path String
The file to check.
Returns
Section titled “Returns”Boolean
true if the caller has the required permissions and path contains the name of an existing file; otherwise, false.
DirectoryExists(String)
Section titled “DirectoryExists(String)”Determines whether the given path refers to an existing directory on disk.
bool DirectoryExists(string path)Parameters
Section titled “Parameters”path String
The path to test.
Returns
Section titled “Returns”Boolean
true if path refers to an existing directory; false if the directory does not exist or an error occurs when trying to determine if the specified directory exists.