mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Implement SynchronousIOManager.ReadFile
Removed cancellationToken parameter due to needless implementation complexity
This commit is contained in:
@@ -28,9 +28,8 @@ namespace Tgstation.Server.Host.Core
|
||||
/// Read the <see cref="byte"/>s of a file at a given <paramref name="path"/>
|
||||
/// </summary>
|
||||
/// <param name="path">The path of the file to read</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
|
||||
/// <returns>A <see cref="byte"/> array representing the contents of the file at <paramref name="path"/></returns>
|
||||
byte[] ReadFile(string path, CancellationToken cancellationToken);
|
||||
byte[] ReadFile(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Write <paramref name="data"/> to a file at a given <paramref name="path"/>.
|
||||
|
||||
@@ -31,10 +31,7 @@ namespace Tgstation.Server.Host.Core
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public byte[] ReadFile(string path, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public byte[] ReadFile(string path) => File.ReadAllBytes(path);
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool WriteFileChecked(string path, byte[] data, string previousSha1, CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user