withFileName method
Creates an PathBuf like this but with the given file name.
Implementation
Path withFileName(String fileName) => isWindows
? Path(WindowsPath(_string).withFileName(fileName)._string)
: Path(UnixPath(_string).withFileName(fileName)._string);