Interface DirHandle

Directory entries can be obtained through asynchronous iteration:

const dirIter = await tjs.readdir('.');
for await (const item of dirIter) {
console.log(item.name);
}

Hierarchy

  • AsyncIterableIterator<DirEnt>
    • DirHandle

Properties

path: string

Path of the directory.

Methods

  • Returns AsyncIterableIterator<DirEnt>

  • Closes the directory handle.

    Returns Promise<void>

  • Parameters

    • Rest ...args: [] | [undefined]

    Returns Promise<IteratorResult<DirEnt, any>>

  • Parameters

    • Optional value: any

    Returns Promise<IteratorResult<DirEnt, any>>

  • Parameters

    • Optional e: any

    Returns Promise<IteratorResult<DirEnt, any>>

Generated using TypeDoc