System.FilePath propsal (Was: Cabal feedback notes)

Krasimir Angelov ka2_mail at yahoo.com
Thu Oct 28 09:52:03 EDT 2004


--- Graham Klyne <gk at ninebynine.org> wrote:
> > > 2. How does path joining work in this case:
> > >
> > >     joinPaths C:/root/path/file.ext
> > > altPath/file2.ext2
> > >
> > > i.e. is "file.ext" discarded?
> >
> >No. You will get:
> >
> >C:/root/path/file.ext/altPath/file2.ext2
> 
> Hmmm.  I can't claim it's wrong, but I'm uneasy
> about that.  It is, for 
> example, different from the way that URI path
> joining works.

What do you expect to get? file.ext is a valid
directory name. By the way 

joinPaths "c:/dir1/file.ext" "c:/dir2" == "c:/dir2"

because the second path is absolute.

> 
> What about:
> 
>    joinPaths C:/root/path/ altPath/file2.ext2
> 
> does this give:
>    C:/root/path/altPath/file2.ext2
> or
>    C:/root/path//altPath/file2.ext2
> 
> ?

The first one. "//" is equal to "/", isn't it?

Cheers,
  Krasimir



		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 


More information about the Libraries mailing list