Home > @microsoft/node-core-library > Path

Path class

Common operations for manipulating file and directory paths.

Signature:

export declare class Path 

Remarks

This API is intended to eventually be a complete replacement for the NodeJS “path” API.

Methods

Method Modifiers Description
isUnder(childPath, parentFolderPath) static Returns true if “childPath” is located inside the “parentFolderPath” folder or one of its child folders. Note that “parentFolderPath” is not considered to be under itself. The “childPath” can refer to any type of file system object.
isUnderOrEqual(childPath, parentFolderPath) static Returns true if “childPath” is equal to “parentFolderPath”, or if it is inside that folder or one of its children. The “childPath” can refer to any type of file system object.