writeFile
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/plugins/fs · Kind Function
import { writeFile } from '@netwiv/api/plugins/fs';Write data to the given path, by default creating a new file if needed, else overwriting.
Signature
Section titled “Signature”function writeFile(path: string | URL, data: Uint8Array<ArrayBufferLike> | ReadableStream<Uint8Array<ArrayBufferLike>>, options?: WriteFileOptions | undefined): Promise<void>Example
Section titled “Example”import { writeFile, BaseDirectory } from '@netwiv/api/plugins/fs';
let encoder = new TextEncoder();let data = encoder.encode("Hello World");await writeFile('file.txt', data, { baseDir: BaseDirectory.AppLocalData });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.