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));
|