mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-25 01:19:13 +01:00
refactor: share the case-insensitive lookup of data files
The scenery repository's include lookup becomes CaseInsensitivePaths, which takes any folder over IFileSystem and gives a name as it is on disk. Of folders named alike in other case it now tries each, not only the first. A name is joined to the folder as the simulator joins it, a leading slash counting for nothing. IFileSystem tells whether the disk ignores case; there, as on Windows, a name missed as written is not looked for any further, so no folder is listed.
This commit is contained in:
@@ -7,6 +7,9 @@ namespace StarterNG.Application.Abstractions;
|
||||
|
||||
public interface IFileSystem
|
||||
{
|
||||
/// <summary>Whether a name finds its file whatever the case of its letters, as on Windows and macOS.</summary>
|
||||
bool IgnoresCase { get; }
|
||||
|
||||
bool FileExists(string path);
|
||||
|
||||
bool DirectoryExists(string path);
|
||||
|
||||
Reference in New Issue
Block a user