the absolute filepath to convert.
The directory relative to which the path should be converted. Defaults to the current working directory.
The relative path.
This function takes an absolute path as input and returns a relative path. It replaces the current working directory in the path with an empty string, replaces all backslashes with forward slashes, and removes any leading forward slashes.
pathAbsoluteToRelativeCwd(__filename)
//=> 'src/pathAbsoluteToRelativeCwd.ts'
Generated using TypeDoc
If the filepath is somewhere in the current working directory, it can be converted into a relative path.