FilePathsBase.jl
FilePathsBase.jl copied to clipboard
basename should return a Path
No reason that it returns a String, right?
basename returns a string because (1) that's what base does and (2) if you think of a path as collection of string segments then basename should be equivalent to returning the last segment. I suppose if we supported indexing then that would be an argument for having basename return a path version of the string.
I just thought of another reason why basename should return a String. What should basename(s3path) return? A relative S3Path doesn't really make sense, so would this just return a SystemPath?