WriteFileTool
Writes UTF-8 text to a file, sandboxed to external storage via PathValidator. mode is create (default; fails if the file exists), overwrite or append. Parent directories are created only with create_dirs. Content is capped at MAX_CHARS characters. Nothing under Android/ (other apps' data) can be written. On API 30+ only this app's own files and new files in shared folders such as Download/ or Documents/ are writable; see FilesTools for API 28-29. Output: path, bytes_written, size_bytes (file size afterwards), created.