PathInfoBase class
PathInfoBase class
Section titled “PathInfoBase class”Cached stat provider
Signature:
export declare class PathInfoBaseRemarks
Section titled “Remarks”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.
Example
Section titled “Example”Reusing cached metadata during a build step
import { Path } from "pathlib-ts";
const entry = new Path("./dist/app.js");const info = entry.info; // PathInfoBase instance
if (await info.exists()) { console.log(await info.isFile());}Constructors
Section titled “Constructors”|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
Section titled “Properties”|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string |
Methods
Section titled “Methods”|
Method |
Modifiers |
Description |
|---|---|---|
|
| ||
|
|
Synchronous variant of statInternal. Mirrors the async behavior but uses fs.statSync/fs.lstatSync. | |