Skip to content

PathInfo class

pathlib-ts > PathInfo

Cached stat provider corresponding to CPython’s pathlib.types.PathInfo protocol.

Signature:

export declare class PathInfo extends PathInfoBase

Extends: PathInfoBase

Instances wrap a filesystem path string and lazily cache fs.statSync / fs.lstatSync results. Methods such as PathInfoBase.exists() resolve once and reuse their cached value to avoid duplicate system calls when Path.info is reused across operations.