download_file
Download a Moodle file from a pluginfile URL to a local path, creating the target directory if missing.
Instructions
Download a Moodle file (from get_course_contents) to a local path.
The Moodle token is appended automatically. The target directory is created if missing.
Args:
file_url: pluginfile.php URL from a module's contents[].fileurl
save_path: absolute local path to write the file to
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| save_path | Yes |