Proposal: expose the drive functions in the filepath package

Ian Lynagh igloo at earth.li
Sat Jul 14 19:47:15 EDT 2007


Hi Bulat,

On Sat, Jul 14, 2007 at 11:01:13PM +0400, Bulat Ziganshin wrote:
> 
> well, i don't know FilePath library but if it has some sort of
> canonizeFilename function, this function should make this check
> yourself and shouldn't strip trailing '\' after ':' for obvious reason
> - 'c:' and 'c:\' are different directories

The normalise function doesn't affect whether or not there is a trailing
separator:

Prelude System.FilePath.Windows> normalise "c:"
"C:"
Prelude System.FilePath.Windows> normalise "c:\\"
"C:\\"
Prelude System.FilePath.Windows> normalise "c:\\foo"
"C:\\foo"
Prelude System.FilePath.Windows> normalise "c:\\foo\\"
"C:\\foo\\"


Thanks
Ian



More information about the Libraries mailing list