mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-18 14:35:59 +01:00
Split Settings into model, serializer, paths and store
698 lines did all of it at once. The mutable CaptureFromUi callback becomes an ISettingsCapture the settings view implements.
This commit is contained in:
@@ -52,4 +52,14 @@ public sealed class PhysicalFileSystem : IFileSystem
|
||||
Directory.Exists(path) ? Directory.GetDirectories(path) : Array.Empty<string>();
|
||||
|
||||
public DateTime GetLastWriteTimeUtc(string path) => File.GetLastWriteTimeUtc(path);
|
||||
|
||||
public bool IsExecutable(string path)
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
return true;
|
||||
|
||||
const UnixFileMode anyExecute =
|
||||
UnixFileMode.UserExecute | UnixFileMode.GroupExecute | UnixFileMode.OtherExecute;
|
||||
return (File.GetUnixFileMode(path) & anyExecute) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user