mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-17 05:24:09 +01:00
Look at each source file of a scenery once
The watch of scenery files asked three times per file, whether it is there, its time and its size, every two seconds for every source of every scenery. One look gives all three.
This commit is contained in:
@@ -110,6 +110,12 @@ public sealed class PhysicalFileSystem : IFileSystem
|
||||
|
||||
public long GetFileSize(string path) => new FileInfo(path).Length;
|
||||
|
||||
public (DateTime LastWriteUtc, long Size)? LastWriteAndSize(string path)
|
||||
{
|
||||
var info = new FileInfo(path);
|
||||
return info.Exists ? (info.LastWriteTimeUtc, info.Length) : null;
|
||||
}
|
||||
|
||||
public bool IsExecutable(string path)
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
|
||||
Reference in New Issue
Block a user