withFileName method
Creates an PathBuf like this but with the given file name.
Implementation
UnixPath withFileName(String fileName) {
final parentOption = parent();
return switch (parentOption) {
None => UnixPath(fileName),
// ignore: pattern_never_matches_value_type
Some(:final v) => v.join(UnixPath(fileName)),
};
}