From 51d820e22a4517dbb06d38a4f07f7c48522ef811 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 5 Jun 2023 03:25:53 +0200 Subject: Initial commit --- LibGitTest/FileRepoSource.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 LibGitTest/FileRepoSource.cs (limited to 'LibGitTest/FileRepoSource.cs') 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 GetFileStream(string path) + { + return File.OpenRead(Path.Join(BasePath, path)); + } +} \ No newline at end of file -- cgit 1.5.1