Skip to content

DirEntryInfo class

pathlib-ts > DirEntryInfo

PathInfo implementation that wraps a Node Dirent.

Signature:

export declare class DirEntryInfo extends PathInfoBase

Extends: PathInfoBase

Populated when directory entries are generated via fs.readdir({ withFileTypes: true }). The class stores the original dirent and optionally the parent path, exposing cached stat information where possible to reduce redundant filesystem calls during iteration.

Constructor

Modifiers

Description

(constructor)(entry, parentPath)

Constructs a new instance of the DirEntryInfo class

Method

Modifiers

Description

statInternal(opts)