static void Main(string[] args) { Console.WriteLine("Zsyncnet TestBench"); //ZsyncMake.Make(new FileInfo(@"D:\BSUTest\Input\@ace\ace_advanced_ballistics.dll")); ZsyncMake.Make(new FileInfo(@"/home/james/tmp/test/web/ace_advanced_ballistics.dll")); //var iso = Zsync.Sync(new Uri("http://*****:*****@"D:\tmp\test")); //Console.WriteLine($"ISO Total Bytes: {dll}"); var dll = Zsync.Sync(new Uri("http://*****:*****@"/home/james/tmp/test/client")); }
public override void Do(DirectoryInfo sourceDirectory, DirectoryInfo destinationDirectory, bool dryRun) { var sourcePath = Path.Combine(sourceDirectory.FullName, RelPath); var destinationPath = Path.Combine(destinationDirectory.FullName, RelPath) + ".zsync"; if (dryRun) { Console.WriteLine($"Would create zsync control file for {sourcePath} in {destinationPath}"); return; } Directory.CreateDirectory(Path.GetDirectoryName(destinationPath) !); Console.WriteLine($"Creating zsync control file for {sourcePath} in {destinationPath}"); var controlFile = ZsyncMake.MakeControlFile(new FileInfo(sourcePath)); controlFile.WriteToFile(destinationPath); }
public RepositoryFactory(ZsyncMake zsyncMake) { _zsyncMake = zsyncMake; }