filesystem_manage
Manage files in a Godot project's res:// filesystem: read, write, search, reimport, and trigger scans to register class_name scripts.
Instructions
Project filesystem access via the Godot editor's EditorFileSystem.
Ops:
• read_text(path)
Read a text file at a res:// path. Returns content, size,
line_count.
• write_text(path, content="")
Create or overwrite a text file. Triggers an editor filesystem
scan. Newly-created files include data.cleanup.rm for transient
smoke tests; overwrite omits the field.
• reimport(paths)
Force-reimport the listed files via EditorFileSystem.update_file.
paths is a list of res:// paths.
• scan()
Force a full EditorFileSystem.scan() and wait for it to settle.
This is the headless equivalent of the editor regaining window focus:
write_text/script_create register single files but do NOT
rebuild the global class_name table, so a freshly-created
class_name MyThing extends Resource is invisible to
resource_manage/type references until a scan runs. Call this once
after adding class_name scripts when the editor isn't focused.
Single-flight (awaits any in-progress scan rather than stacking another).
Returns scan_completed and global_classes_registered_delta.
• search(name="", type="", path="", offset=0, limit=100)
Find files by name, resource type, or path substring. At least one
filter must be set. Paginated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||