mirror of
https://github.com/nodejs/node.git
synced 2024-11-28 14:33:11 +01:00
3c50297e9e
PR-URL: https://github.com/nodejs/node/pull/54065 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
24 lines
823 B
TypeScript
24 lines
823 B
TypeScript
import { InternalFSBinding } from './fs';
|
|
|
|
declare namespace InternalFSDirBinding {
|
|
import FSReqCallback = InternalFSBinding.FSReqCallback;
|
|
type Buffer = Uint8Array;
|
|
type StringOrBuffer = string | Buffer;
|
|
|
|
class DirHandle {
|
|
read(encoding: string, bufferSize: number, callback: FSReqCallback): string[] | undefined;
|
|
read(encoding: string, bufferSize: number): string[] | undefined;
|
|
close(callback: FSReqCallback): void;
|
|
close(): void;
|
|
}
|
|
|
|
function opendir(path: StringOrBuffer, encoding: string, req: FSReqCallback): DirHandle;
|
|
function opendir(path: StringOrBuffer, encoding: string): DirHandle;
|
|
function opendirSync(path: StringOrBuffer): DirHandle;
|
|
}
|
|
|
|
export interface FsDirBinding {
|
|
opendir: typeof InternalFSDirBinding.opendir;
|
|
opendirSync: typeof InternalFSDirBinding.opendirSync;
|
|
}
|