create
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/plugins/fs · Kind Function
import { create } from '@netwiv/api/plugins/fs';Creates a file if none exists or truncates an existing file and resolves to an instance of {@linkcode FileHandle}.
Signature
Section titled “Signature”function create(path: string | URL, options?: CreateOptions | undefined): Promise<FileHandle>Example
Section titled “Example”import { create, BaseDirectory } from "@netwiv/api/plugins/fs"const file = await create("foo/bar.txt", { baseDir: BaseDirectory.AppConfig });await file.write(new TextEncoder().encode("Hello world"));await file.close();Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-fs@2.5.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.