mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
307430e490
PR-URL: https://github.com/nodejs/node/pull/53667 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
24 lines
838 B
TypeScript
24 lines
838 B
TypeScript
import {InternalFSBinding, ReadFileContext} 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;
|
|
}
|