search_files
Search for files by name pattern within a specified directory and its subdirectories, respecting exclusions and .gitignore rules. Returns matching absolute file paths or an error message.
Instructions
Search for files by name pattern in a directory recursively.
Args: dir (str): Directory to search in (absolute or relative to allowed directories) pattern (str): Glob-style pattern to match file names (e.g., '.py', 'test_') exclude (str, optional): Glob-style pattern to exclude file names
Returns: List[str] | str: List of matching absolute file paths, or error message if failed
Note:
Input Schema
Name | Required | Description | Default |
---|---|---|---|
dir | Yes | ||
exclude | No | ||
pattern | Yes |