# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

RMZ_METADATA = Metadata(
    id="6b7bfd257d51dec2f12da456189674a0ac1ddd7e.boutiques",
    name="rmz",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class RmzOutputs(typing.NamedTuple):
    """
    Output object returned when calling `rmz(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def rmz(
    filenames: list[InputPathType],
    quiet: bool = False,
    hash_flag: float | None = None,
    keep_flag: bool = False,
    runner: Runner | None = None,
) -> RmzOutputs:
    """
    Zeros out files before removing them.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/rmz.html
    
    Args:
        filenames: Files to zero out and remove.
        quiet: Quiet mode.
        hash_flag: Number of times to zero out the files.
        keep_flag: Keep the files instead of removing them.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `RmzOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(RMZ_METADATA)
    cargs = []
    cargs.append("rmz")
    if quiet:
        cargs.append("-q")
    if hash_flag is not None:
        cargs.extend([
            "-#",
            str(hash_flag)
        ])
    if keep_flag:
        cargs.append("-k")
    cargs.extend([execution.input_file(f) for f in filenames])
    ret = RmzOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "RMZ_METADATA",
    "RmzOutputs",
    "rmz",
]
