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

import typing
import pathlib
from styxdefs import *
import dataclasses

MKSUBJDIRS_METADATA = Metadata(
    id="19b08b172da5b6336a32dd0488cf331beb47bbc0.boutiques",
    name="mksubjdirs",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def mksubjdirs(
    subj_name: str,
    mode: str | None = None,
    parents: bool = False,
    verbose: bool = False,
    selinux_context: bool = False,
    help_: bool = False,
    version: bool = False,
    runner: Runner | None = None,
) -> MksubjdirsOutputs:
    """
    A command-line tool to create subject directories.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subj_name: Name of the subject directory to create.
        mode: Set file mode (as in chmod), not a=rwx - umask.
        parents: No error if existing, make parent directories as needed.
        verbose: Print a message for each created directory.
        selinux_context: Set SELinux security context of each created directory\
            to the default type.
        help_: Display help and exit.
        version: Output version information and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MksubjdirsOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MKSUBJDIRS_METADATA)
    cargs = []
    cargs.append("mksubjdirs")
    cargs.append(subj_name)
    if mode is not None:
        cargs.extend([
            "-m",
            mode
        ])
    if parents:
        cargs.append("-p")
    if verbose:
        cargs.append("-v")
    if selinux_context:
        cargs.append("-Z")
    if help_:
        cargs.append("--help")
    if version:
        cargs.append("--version")
    ret = MksubjdirsOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MKSUBJDIRS_METADATA",
    "MksubjdirsOutputs",
    "mksubjdirs",
]
