Don't hash framecount of >256mb files as it's too slow and I/O heavy

This commit is contained in:
N00MKRAD
2021-02-04 21:18:36 +01:00
parent 99ed008d74
commit 2932e702e3
3 changed files with 27 additions and 5 deletions

View File

@@ -738,13 +738,27 @@ namespace Flowframes.IO
public static long GetFilesize(string path)
{
return new FileInfo(path).Length;
try
{
return new FileInfo(path).Length;
}
catch
{
return -1;
}
}
public static string GetFilesizeStr (string path)
{
return FormatUtils.Bytes(GetFilesize(path));
}
try
{
return FormatUtils.Bytes(GetFilesize(path));
}
catch
{
return "?";
}
}
public static byte[] GetLastBytes (string path, int startAt, int bytesAmount)
{