AbstractFileTask
The foundational base class for all file-centric tasks. Provides robust glob-based file resolution, automated content extraction for non-text formats, and intelligent binary file filtering.
Category: Base Task
Side-Effect: Context-Dependent
Extensible
⚙️ FileTaskExecutionConfig
{
"files": ["src/**/*.kt"],
"related_files": ["docs/spec.pdf"],
"extractContent": true,
"task_description": "Analyze project structure"
}
→
👁️ Resolved Context
// Resolved Input Files:
# src/main/App.kt
```kotlin ... ```
// Extracted Content (PDF):
# docs/spec.pdf
```text [Extracted via PaginatedReader] ... ```
Test Workspace Explorer
Browse the file structure and resolved context from the AbstractFileTask test suite.
This demonstrates how the task handles glob patterns and binary filtering in a real environment.
Execution Configuration
| Field | Type | Description |
|---|---|---|
files * |
List<String> |
Relative paths or glob patterns (e.g. **/*.js) for output/target files. |
related_files |
List<String> |
Additional context files. Supports glob patterns. |
extractContent |
Boolean |
If true, uses PaginatedDocumentReader to pull text from PDFs, HTML, etc. Defaults to false. |
Automatic Filtering
The task automatically ignores binary and media files unless content extraction is explicitly enabled. Ignored extensions include:
.class, .jar, .exe, .png, .jpg, .mp4, .zip, .dll