Skip to content

fs

Modern and easy-to-use file system API.

Oct 10, 2026
  • a934743b (#3637) Added the scopeDroppedPaths plugin config option (plugins > fs > scopeDroppedPaths in tauri.conf.json). Set it to false to stop adding the paths dropped onto any window to the fs scope, which otherwise gives every webview with an fs permission access to them (directories recursively). Defaults to true, the current behaviour.
  • 085a0283 (#3636) Fixed a panic on Android when a content provider returns no file descriptor for a content:// URI (e.g. virtual files). The fs command now fails with an error instead.
  • f81f0447 (#3635) Fixed reading uncompressed Android assets ($RESOURCE files such as images or audio that are stored uncompressed in the APK) returning the bytes of the APK instead of the asset. Assets are now always read from a copy in the app cache, like compressed ones.
  • e03dca60 (#3628) startAccessingSecurityScopedResource and stopAccessingSecurityScopedResource now accept absolute paths on iOS, as documented, instead of silently doing nothing unless given a file:// URL.
  • 5de7ebfc (#3634) Security: the open command no longer accepts a customFlags option from the webview. It was not part of the JavaScript types and let the webview pass arbitrary open(2) flags (e.g. O_TRUNC) to files it may only read. OpenOptionsExt::custom_flags still works from Rust.
  • 5e6c023a (#3626) FileHandle.read no longer allocates a buffer of the requested size up front: the length is capped to the rest of the file (64 MiB for files of unknown size), an allocation failure is reported as an error instead of aborting the app, and only the bytes that were read are sent back to the webview.
  • 3a900017 (#3627) Security: the fs scope check now resolves symlinks in the ancestors of paths that do not exist yet, and resolves relative symlink targets against the link's directory instead of the process working directory. Previously a new file created below a symlinked directory inside the scope (writeFile, mkdir, create, rename, copyFile, …) was written outside of the scope. Deny patterns now also apply to the path as given, so they can name a symlink, and a path whose symlinks cannot be resolved (e.g. a loop) is rejected.
  • 77d00a4f (#3633) FileHandle.seek now rejects a negative offset with SeekMode.Start instead of seeking to a huge position.
  • 5c144e74 (#3631) Fixed readTextFileLines with a UTF-16 encoding splitting lines on a 0x0A 0x00 (LE) or 0x00 0x0A (BE) byte sequence that is not aligned on a code unit, e.g. ਗĀ, which garbled every following line.
  • dcc8cb03 (#3629) Fixed writeFile with a ReadableStream leaving the end of the previous contents in place when the new data is shorter. The file is now truncated first unless append is set, like when writing a buffer.
Sep 26, 2026
  • 97e865bc (#3623) Added an options parameter with baseDir to size, so relative paths can be measured, like the other functions and like the JSDoc example already showed. The Rust command already accepted it.
  • 9106093f (#3624) Fixed opening Android content:// URIs with append or with write, truncate and append together: the options were turned into invalid modes such as ra or wta. They now map to the modes Android accepts (r, w, wt, wa, rw, rwt), append taking precedence over read since there is no read and append mode.
  • 1cae06a5 (#3625) Fixed readTextFileLines yielding empty lines forever when reading fails (e.g. on a directory). The read error is now reported: the iterator rejects and the file is closed.
  • 1cae06a5 (#3625) Fixed readTextFileLines leaving the file open until the webview is destroyed when a for await loop over it exits early (break, return or throw). The iterator now implements return(), which closes the file.
  • 0c84c917 (#3621) File watcher errors (e.g. the watched directory was removed or the inotify limit was reached) are now logged instead of being silently dropped.
  • b46a88ff (#3622) writeFile and writeTextFile now fail when their options cannot be parsed instead of silently ignoring them (including baseDir, append and createNew) and writing to the raw path. Data sent as a JSON array is rejected if it contains values that are not bytes, instead of truncating them.
  • ae3c808e (#3602) The plugin's global API script (used with app.withGlobalTauri) now resolves the core API from window.__TAURI__ instead of bundling its own copy of @tauri-apps/api. Values created with the core API are now accepted by plugin APIs in global mode (e.g. an Image from window.__TAURI__.image passed to clipboardManager.writeImage, which previously failed the instanceof check against the plugin's private copy), and the script is considerably smaller.
  • 9b29b601 Update MSRV to 1.90 to match tauri.
  • a87a3c7d Update documentation.
Aug 31, 2026
May 2, 2026
Apr 4, 2026
  • e97a4ded (#3244 by @SeijiOkuda) Add encoding option for readTextFile and readTextFileLines
  • f75d21db (#3360 by @Legend-Master) Removed the dependency on tauri-utils's build feature
  • f5f68063 (#3185 by @lucasfernog) Enable access for security-scoped resources on iOS by automatically calling NSURL::startAccessingSecurityScopedResource on resource access and adding the stopAccessingSecurityScopedResource API.
Jan 8, 2026
  • 521cd8b3 (#3155 by @EliasStar) Fix off by one error in the implementation of readTextFileLines causing all lines to end with an (additional) null byte. Issue: #3154 PR: #3155
Oct 27, 2025
  • 93426f85 Fixed an issue that caused docs.rs builds to fail. No user facing changes.
Oct 26, 2025
Aug 20, 2025
  • 4eb36b0f (#2907 by @Legend-Master) Fixed calling writeFile with data: ReadableStream throws Invalid argument
  • 515182a1 (#2915 by @samhinshaw) readFile now returns a more specific type Promise<Uint8Array<ArrayBuffer>> instead of the default Promise<Uint8Array<ArrayBufferLike>
Jul 20, 2025
Jun 25, 2025
May 20, 2025
Apr 2, 2025
  • 831c35ff (#2550) Fix writeFile ReadableStream handling due to missing async iterator support on macOS platform
Dec 9, 2024
  • 3a79266b (#2173 by @FabianLars) Bumped all plugins to v2.2.0. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.

fs full changelog


© 2026 Tauri Contributors. CC-BY / MIT