I hereby claim:
- I am mlschneid on github.
- I am mlschneid (https://keybase.io/mlschneid) on keybase.
I hereby claim:
static async Task<byte[]> ReadBytesAsync(string filePath) | |
{ | |
byte[] buffer; | |
using(FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) | |
{ | |
buffer = new byte[fs.Length]; | |
if (fs.Length < Int32.MaxValue) | |
{ | |
await fs.ReadAsync(buffer, 0, (int)fs.Length); | |
} |