1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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)); } }