-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
337 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="DirectXTexNet" Version="1.0.7" /> | ||
<PackageReference Include="SkiaSharp" Version="3.116.1" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\StarBreaker.Common\StarBreaker.Common.csproj" /> | ||
<ProjectReference Include="..\StarBreaker.FileSystem\StarBreaker.FileSystem.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
src/StarBreaker.FileSystem/FileSystem.cs → src/StarBreaker.FileSystem/RealFileSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
namespace StarBreaker.FileSystem; | ||
|
||
public sealed class FileSystem : IFileSystem | ||
public sealed class RealFileSystem : IFileSystem | ||
{ | ||
public static readonly FileSystem Instance = new(); | ||
public static readonly RealFileSystem Instance = new(); | ||
|
||
public IEnumerable<string> GetFiles(string path) => Directory.EnumerateFiles(path); | ||
|
||
public IEnumerable<string> GetFiles(string path, string searchPattern) => Directory.EnumerateFiles(path, searchPattern); | ||
|
||
public IEnumerable<string> GetDirectories(string path) => Directory.EnumerateDirectories(path); | ||
|
||
public bool FileExists(string path) => File.Exists(path) || Directory.Exists(path); | ||
|
||
public Stream OpenRead(string path) => File.OpenRead(path); | ||
|
||
public byte[] ReadAllBytes(string path) => File.ReadAllBytes(path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.