Module tauri_sys::fs

source ·
Expand description

Access the file system.

The APIs must be added to tauri.allowlist.fs in tauri.conf.json:

{
  "tauri": {
    "allowlist": {
      "fs": {
        "all": true, // enable all FS APIs
        "readFile": true,
        "writeFile": true,
        "readDir": true,
        "copyFile": true,
        "createDir": true,
        "removeDir": true,
        "removeFile": true,
        "renameFile": true,
        "exists": true
      }
    }
  }
}

It is recommended to allowlist only the APIs you use for optimal bundle size and security.

Structs§

Enums§

Functions§