Proposal: Add System.FilePath to base
Benjamin Franksen
benjamin.franksen at bessy.de
Wed Nov 22 12:14:28 EST 2006
Benjamin Franksen wrote:
> What, then, is the result of (addExtension "/" "x")? What, in general, is
> the behavior in case the first argument ends with a path separator?
Another example where the semantics is unclear (to me) is
> takeBaseName :: FilePath -> String Source
> Get the base name, without an extension or path.
> takeBaseName "file/test.txt" == "test"
> takeBaseName "dave.ext" == "dave"
What is (takeBaseName "dir.ext/")? "dir"? Or ""? A general principle that
would clarify this could be "An extension of a file path is always a suffix
of the file path. It never contains a path (directory) separator."
Ben
More information about the Libraries
mailing list