dir:read
Read a directory with filters
Options
| Name | Type | Description |
|---|---|---|
dir | string | The path of the directory to scan |
ext | []string | File extensions to include (e.g. ["go", "md"]); empty means all extensions |
skip_ext | []string | File extensions to exclude |
skip_dir | []string | Subdirectory names to skip during traversal |
levels | int | Depth of directory traversal: -1 for unlimited, 0 for current dir only, 1 for one level deep, etc. |
Outputs
| Name | Type | Description |
|---|---|---|
dir | string | The scanned directory path |
files | []string | List of file paths found |
dirs | []string | List of subdirectory paths found |
Example
name: List the JSON files in a directory
actions:
- name: inputs
component: dir:read
vars:
dir: ./data
ext: json
outputs:
files: "{{ inputs.files }}"