콘텐츠로 이동

stat

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

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

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

Resolves to a {@linkcode FileInfo} for the specified path. Will always follow symlinks but will reject if the symlink points to a path outside of the scope.

function stat(path: string | URL, options?: StatOptions | undefined): Promise<FileInfo>
import { stat, BaseDirectory } from '@netwiv/api/plugins/fs';
const fileInfo = await stat("hello.txt", { baseDir: BaseDirectory.AppLocalData });
console.log(fileInfo.isFile); // true

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.