/// <inheritdoc/> protected override void BuildArgumentParams(ref ProcessArgumentBuilder builder) { Files.RequireNotEmpty( $"some input ({nameof(Files)} or {nameof(Directories)}) are required for hash.", Directories, DirectoryContents); builder.AppendPathsNullSafe(Files); builder.AppendPathsNullSafe(Directories); builder.AppendPathsNullSafe(DirectoryContents); // Directory and DirectoryContents produce the same output for "hash" }
/// <inheritdoc/> protected override void BuildArgumentParams(ref ProcessArgumentBuilder builder) { Archive.RequireNotNull("Archive is required for extract."); builder.AppendQuoted(Archive !.FullPath); builder.AppendPathsNullSafe(Files); }
/// <inheritdoc/> protected override void BuildArgumentParams(ref ProcessArgumentBuilder builder) { Archive.RequireNotNull($"{nameof(Archive)} is required for {CommandName}."); builder.AppendQuoted(Archive !.FullPath); if (ThrowOnMissingInputFiles) { Files.RequireNotEmpty( $"some input ({nameof(Files)} or {nameof(Directories)}) are required for {CommandName}.", Directories, DirectoryContents); } builder.AppendPathsNullSafe(Files); builder.AppendPathsNullSafe(Directories); builder.AppendPathsNullSafe(DirectoryContents, x => x.CombineWithFilePath("*").FullPath); }