@nodelib/fs.stat
Version:
Get the status of a file with some features
14 lines (13 loc) • 654 B
TypeScript
/// <reference types="node" />
import * as fs from 'node:fs';
import type { ErrnoException } from '../types';
export type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void;
export type StatSynchronousMethod = (path: string) => fs.Stats;
export interface FileSystemAdapter {
lstat: StatAsynchronousMethod;
stat: StatAsynchronousMethod;
lstatSync: StatSynchronousMethod;
statSync: StatSynchronousMethod;
}
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;