예제 #1
0
    /// <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"
    }
예제 #2
0
    /// <inheritdoc/>
    protected override void BuildArgumentParams(ref ProcessArgumentBuilder builder)
    {
        Archive.RequireNotNull("Archive is required for extract.");

        builder.AppendQuoted(Archive !.FullPath);
        builder.AppendPathsNullSafe(Files);
    }
예제 #3
0
    /// <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);
    }