Converts a file system path to Windows (Win32) format.
On POSIX systems (Linux/macOS), all forward slashes (/) are replaced with backslashes (``).
/
The path to convert
The path using Windows separators (``).
toWinPath('src/utils/file.ts')// => 'src\\utils\\file.ts' Copy
toWinPath('src/utils/file.ts')// => 'src\\utils\\file.ts'
toWinPath('/usr/local/bin')// => '\\usr\\local\\bin' Copy
toWinPath('/usr/local/bin')// => '\\usr\\local\\bin'
Converts a file system path to Windows (Win32) format.
On POSIX systems (Linux/macOS), all forward slashes (
/) are replaced with backslashes (``).