콘텐츠로 이동

readTextFile

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/plugins/fs · Kind Function

import { readTextFile } from '@netwiv/api/plugins/fs';

Reads and returns the entire contents of a file as a string using the specified encoding (default: UTF-8).

function readTextFile(path: string | URL, options?: ReadFileOptions | undefined): Promise<string>
import { readTextFile, BaseDirectory } from '@netwiv/api/plugins/fs';
const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });

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.