[Haskell-cafe] Re: ANN: System.FilePath 0.9
Krasimir Angelov
kr.angelov at gmail.com
Wed Jul 26 02:46:13 EDT 2006
On 7/26/06, Neil Mitchell <ndmitchell at gmail.com> wrote:
> The main purpose of canoncialPath is to fix the case on Windows, so
> "c:\my documents\file.doc" becomes "C:\My Documents\file.doc" if that
> is the case correct version of the file. I think this function will
> not actually change the file with relation to the underying file
> system, so should be race free. (I will document more to make the
> operation clearer)
Hi Neil,
It seems like your canoncialPath function is already in the base
package. Look at System.Directory.canonicalizePath. I have added it
when I was working on the FilePath module for Cabal.
The FilePath abstraction was discussed a number of times and it
seems that people prefer an ADT representation instead of plain
String. I tend to agree. Maybe such ADT based library can be
integrated with some new IO library like the Streams library.
Cheers,
Krasimir
More information about the Haskell-Cafe
mailing list