summary refs log tree commit diff
path: root/LibGitTest/FileRepoSource.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LibGitTest/FileRepoSource.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/LibGitTest/FileRepoSource.cs b/LibGitTest/FileRepoSource.cs
new file mode 100644

index 0000000..09ec836 --- /dev/null +++ b/LibGitTest/FileRepoSource.cs
@@ -0,0 +1,18 @@ +using LibGit.Interfaces; + +namespace LibGitTest; + +public class FileRepoSource : IRepoSource +{ + public FileRepoSource(string basePath) + { + BasePath = basePath; + } + + public string BasePath { get; set; } + + public async Task<Stream> GetFileStream(string path) + { + return File.OpenRead(Path.Join(BasePath, path)); + } +} \ No newline at end of file