Skip to content
Functionutilsv0.9.0

formatFilePath

Formats a file path relative to the current working directory, with forward slashes on every OS.

It returns the full path when the path is outside the working directory or the runtime has no process.

formatFilePath(
    filePath: string,
    options?: FormatFileOptions
): string