summary refs log tree commit diff
path: root/LibGitTest/FileRepoSource.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-11 18:54:56 +0100
committerRory& <root@rory.gay>2025-12-11 18:54:56 +0100
commit6e2f48e24b0c003b4c8547ff88fc1a7f890a1c1e (patch)
tree7aac58a3a1045bde51e989cb0a1ab1c26c28e68f /LibGitTest/FileRepoSource.cs
parentnet10 (diff)
downloadGitTools-6e2f48e24b0c003b4c8547ff88fc1a7f890a1c1e.tar.xz
read indexes and packs correctly
Diffstat (limited to 'LibGitTest/FileRepoSource.cs')
-rw-r--r--LibGitTest/FileRepoSource.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/LibGitTest/FileRepoSource.cs b/LibGitTest/FileRepoSource.cs

index 09ec836..94d767f 100644 --- a/LibGitTest/FileRepoSource.cs +++ b/LibGitTest/FileRepoSource.cs
@@ -7,10 +7,16 @@ public class FileRepoSource : IRepoSource public FileRepoSource(string basePath) { BasePath = basePath; + if (!Directory.Exists(BasePath)) Console.WriteLine("Warning: Base path does not exist: " + BasePath); } public string BasePath { get; set; } + public async Task<bool> FileExists(string path) + { + return File.Exists(Path.Join(BasePath, path)); + } + public async Task<Stream> GetFileStream(string path) { return File.OpenRead(Path.Join(BasePath, path));