import { Buffer } from "buffer"; import stream from "stream"; declare const constants: { [x: string]: number; }; declare class ReadStream extends stream.Readable { #private; constructor(path: string); _destroy(error: Error | null, callback: (error?: Error | null) => void): void; _read(size: number): void; } declare class WriteStream extends stream.Writable { #private; constructor(path: string); _destroy(error: Error | null, callback: (error?: Error | null) => void): void; _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; } declare function writeFileSync(path: string, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void; type ReadFileOptions = BufferEncoding | { encoding?: BufferEncoding; }; type WriteFileOptions = BufferEncoding | { encoding?: BufferEncoding; }; declare const readFileSync: (path: string, options?: ReadFileOptions) => string | Buffer, readlinkSync: (path: string) => string, rmdirSync: (path: string) => void, unlinkSync: (path: string) => void, statSync: (path: string) => Stats, lstatSync: (path: string) => Stats; declare function readdirSync(path: string): string[]; declare function list(path: string): DirectoryEntry[]; export interface DirectoryEntry { name: string; type: number; atime?: Date; mtime?: Date; ctime?: Date; size?: number; } declare class Stats { dev: number; mode: number; nlink: number; uid: number; gid: number; rdev: number; blksize: number; ino: number; size: number; blocks: number; atimeMs: number; mtimeMs: number; ctimeMs: number; birthtimeMs: number; atime: Date; mtime: Date; ctime: Date; birthtime: Date; buffer: NativePointer; isFile(): boolean; isDirectory(): boolean; isCharacterDevice(): boolean; isBlockDevice(): boolean; isFIFO(): boolean; isSymbolicLink(): boolean; isSocket(): boolean; } type AsyncCallback = (error: Error | null, result?: T) => void; export declare function createReadStream(path: string): ReadStream; export declare function createWriteStream(path: string): WriteStream; export declare const readdir: (path: string, args_1: AsyncCallback) => void; export declare const readFile: (path: string, options: ReadFileOptions | undefined, args_2: AsyncCallback>) => void; export declare const writeFile: (path: string, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions | undefined, args_3: AsyncCallback) => void; export declare const readlink: (path: string, args_1: AsyncCallback) => void; export declare const rmdir: (path: string, args_1: AsyncCallback) => void; export declare const unlink: (path: string, args_1: AsyncCallback) => void; export declare const stat: (path: string, args_1: AsyncCallback) => void; export declare const lstat: (path: string, args_1: AsyncCallback) => void; export { constants, readdirSync, list, readFileSync, writeFileSync, readlinkSync, rmdirSync, unlinkSync, statSync, lstatSync, Stats, }; declare const _default: { constants: { [x: string]: number; }; createReadStream: typeof createReadStream; createWriteStream: typeof createWriteStream; readdir: (path: string, args_1: AsyncCallback) => void; readdirSync: typeof readdirSync; list: typeof list; readFile: (path: string, options: ReadFileOptions | undefined, args_2: AsyncCallback>) => void; readFileSync: (path: string, options?: ReadFileOptions) => string | Buffer; writeFile: (path: string, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions | undefined, args_3: AsyncCallback) => void; writeFileSync: typeof writeFileSync; readlink: (path: string, args_1: AsyncCallback) => void; readlinkSync: (path: string) => string; rmdir: (path: string, args_1: AsyncCallback) => void; rmdirSync: (path: string) => void; unlink: (path: string, args_1: AsyncCallback) => void; unlinkSync: (path: string) => void; stat: (path: string, args_1: AsyncCallback) => void; statSync: (path: string) => Stats; lstat: (path: string, args_1: AsyncCallback) => void; lstatSync: (path: string) => Stats; Stats: typeof Stats; }; export default _default;