DirectoryInput (autotransform.input.directory)

The implementation for the DirectoryInput.

class autotransform.input.directory.DirectoryInput(*, paths: List[str])

Bases: Input

An Input that lists all files recursively within a provided directory.

paths

The paths of the directories to fetch all files within.

Type:

List[str]

name

The name of the component.

Type:

ClassVar[InputName]

get_items() Sequence[FileItem]

Gets a list of files recursively contained within the path.

Returns:

The eligible files for transformation.

Return type:

Sequence[FileItem]

name: ClassVar[InputName] = 'directory'
classmethod path_legacy_setting_validator(values: Dict[str, Any]) Dict[str, Any]

Validates paths using legacy path setting.

Parameters:

values (Dict[str, Any]) – The values used to configure the DirectoryInput.

Raises:

ValueError – Raised if both path and paths are supplied.

Returns:

The fixed values.

Return type:

Mapping[str, Any]

paths: List[str]