toValidFilePath 
Requires a Node.js runtime ('qsu/node')Remove invalid or unnecessary characters in the path.
Parameters
filePath::stringisWindows::boolean: Whether the target operating system to be checked is Windows
Named
Returns
string
Examples
javascript
toValidFilePath('C:\\Windows\\System32\\', true); // 'C:\Windows\System32'
toValidFilePath('home/user/.bashrc'); // '/home/user/.bashrc'dart
toValidFilePath('C:\\Windows\\System32\\', isWindows: true); // 'C:\Windows\System32'
toValidFilePath('home/user/.bashrc'); // '/home/user/.bashrc'