-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #53631 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
1 parent
662bf52
commit 2d8490f
Showing
3 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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, _: unknown, ctx: ReadFileContext): string[] | undefined; | ||
close(_: unknown, ctx: ReadFileContext): void; | ||
} | ||
|
||
function opendir(path: StringOrBuffer, encoding: string, req: FSReqCallback): DirHandle; | ||
function opendir(path: StringOrBuffer, encoding: string, _: undefined, ctx: ReadFileContext): DirHandle; | ||
function opendirSync(path: StringOrBuffer): DirHandle; | ||
} | ||
|
||
export interface FsDirBinding { | ||
opendir: typeof InternalFSDirBinding.opendir; | ||
opendirSync: typeof InternalFSDirBinding.opendirSync; | ||
} |