mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-07-13 14:00:48 +02:00
Don't hash framecount of >256mb files as it's too slow and I/O heavy
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user