public ZsyncMakeCommand(IZsyncMake zsyncMake) { _zsyncMake = zsyncMake; IsCommand("zsyncmake", "Zsync Make handling"); HasOption("o|overwrite", "Overwrite zsync files (recreate even if matches)", s => Overwrite = s != null); HasOption("t|thorough", "Check zsync files to see if they need to be re-generated", s => Thorough = s != null); HasOption("s|smart", "Use thorough only where applicable", s => Smart = s != null); AllowsAnyAdditionalArguments("<file or folder> (<file or folder>...)"); }
public PushCommand(IRsyncLauncher launcher, IZsyncMake zsyncMake) { _rsyncLauncher = launcher; _zsyncMake = zsyncMake; IsCommand("push", "Rsync Push"); HasAdditionalArguments(2, "<source> <destination>"); HasOption("k|key=", "Path to key", s => Key = s); HasOption("m|makezsync", "Make zsync files", s => MakeZsync = s != null); HasOption("o|overwrite", "Overwrite zsync files (recreate even if matches)", s => Overwrite = s != null); }
public Repository(IZsyncMake zsyncMake, StatusRepo statusRepo, string folder = ".") { Contract.Requires<ArgumentNullException>(folder != null); Contract.Requires<ArgumentNullException>(!string.IsNullOrWhiteSpace(folder)); _zsyncMake = zsyncMake; Folder = RepoTools.GetRootedPath(folder); RsyncFolder = Folder.GetChildDirectoryWithName(RepoFolderName); if (!RsyncFolder.Exists) throw new Exception("Not a SixSync repository"); ConfigFile = GetRsyncFile(ConfigFileName); RepoName = Folder.DirectoryName; StatusRepo = statusRepo; Output = "print"; MultiThreadingSettings = new MultiThreadingSettings(); LoadConfig(true); LoadVersions(); }
public Repository(IZsyncMake zsyncMake, string folder = ".") : this(zsyncMake, new StatusRepo(), folder) {}