Skip to content
Tauri

open

open(path, options?): Promise<FileHandle>

Defined in: plugins/fs/guest-js/index.ts:565

Open a file and resolve to an instance of FileHandle. The file does not need to previously exist if using the create or createNew open options. It is the callers responsibility to close the file when finished with it.

string | URL

OpenOptions

Promise<FileHandle>

import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
const file = await open("foo/bar.txt", { read: true, write: true, baseDir: BaseDirectory.AppLocalData });
// Do work with file
await file.close();

2.0.0


© 2025 Tauri Contributors. CC-BY / MIT