System.FilePath propsal (Was: Cabal feedback notes)
ka2_mail at yahoo.com
Wed Oct 27 16:05:29 EDT 2004
--- Graham Klyne <GK at ninebynine.org> wrote:
> 1. How are multiple extensions handled? (e.g.
> foo.tar.gz) I think this is
> catered for, with the final extension being picked
splitFileExt always return the last extension.
> 2. How does path joining work in this case:
> joinPaths C:/root/path/file.ext
> i.e. is "file.ext" discarded?
No. You will get:
> 3. What is the purpose of commonInit?
commonInit is renamed to commonParent in the last
version. It returns the largest path that is common in
all paths in the list.
> Also, a very small point: I forgot that FilePath is
> defined in the
> prelude... maybe a comment to this effect on the
> module export list?
I will add FilePath to the export list (Simon's
> I tend to agree with the comments about case
> normalization. maybe better
> to have a path comparison function that takes
> system-dependent equivalences
> into account?
The normalizeCase function was removed from the
> I'm rather taken by the approach that Peter Simons
> suggests 
> (abstracting the path composition), but I suspect
> there are more details to
> be worked out there. It also makes my earlier
> suggestion  of using a
> URI-based representation as a common abstraction
> seem slightly less
> radical. I also note Simon's comments on this
> (don't do it yet_) are
> persuasive. I'll reserve my campaign to unify
> filenames and URIs for the
> "ultimate" FilePath abstraction ;-)
It could be great to have filePathToURI and
uriToFilePath functions in Network.URI. There we can
also have URI manipulation functions but this doesn't
mean that we don't need have System.FilePath in
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
More information about the Libraries