DocsWorkflowsComponentsStoragestorage:local:file:find

storage:local:file:find

Options

NameTypeDescription
pathstringFile or directory to search, resolved inside the host's file root; directories are scanned recursively
ext[]stringFile extensions to restrict the search (e.g. ["go", "md"])
patternstringRegex pattern to match within file contents
matchesmap[string]stringMaps capture group index (as string) to an output key name

Example

name: Find post files and capture their slug
actions:
  - name: posts
    component: storage:local:file:find
    vars:
      path: ./content
      ext: md
      pattern: '^post-(.*)\.md$'
      matches:
        "1": slug