withFileName method

Path withFileName(
  1. String fileName
)

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);