tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ISynchronousIOManager.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.IO;
3using System.Threading;
4
6{
11 {
18 IEnumerable<string> GetFiles(string path, CancellationToken cancellationToken);
19
26 IEnumerable<string> GetDirectories(string path, CancellationToken cancellationToken);
27
34 bool CreateDirectory(string path, CancellationToken cancellationToken);
35
41 byte[] ReadFile(string path);
42
48 bool DeleteDirectory(string path);
49
58 bool WriteFileChecked(string path, Stream data, ref string? sha1InOut, CancellationToken cancellationToken);
59
65 bool IsDirectory(string path);
66 }
67}
For accessing the disk in a synchronous manner.
byte[] ReadFile(string path)
Read the bytes of a file at a given path .
bool IsDirectory(string path)
Checks if a given path is a directory.
IEnumerable< string > GetFiles(string path, CancellationToken cancellationToken)
Enumerate files in a given path .
bool WriteFileChecked(string path, Stream data, ref string? sha1InOut, CancellationToken cancellationToken)
Write data to a file at a given path .
bool CreateDirectory(string path, CancellationToken cancellationToken)
Create an empty directory at path .
IEnumerable< string > GetDirectories(string path, CancellationToken cancellationToken)
Enumerate directories in a given path .
bool DeleteDirectory(string path)
Deletes a directory at path if it's empty.