Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > Path > formatConcisely

Path.formatConcisely() method

Formats a path to look nice for reporting purposes.

Signature:

static formatConcisely(options: IPathFormatConciselyOptions): string;

Parameters

ParameterTypeDescription
optionsIPathFormatConciselyOptions

Returns:

string

Remarks

If pathToConvert is under the baseFolder, then it will be converted to a relative with the ./ prefix unless the IPathFormatConciselyOptions.trimLeadingDotSlash option is set to true. Otherwise, it will be converted to an absolute path.

Backslashes will be converted to slashes, unless the path starts with an OS-specific string like C:\.