System.FilePath propsal

Ketil Malde ketil+haskell at
Thu Oct 28 15:54:05 EDT 2004

Graham Klyne <gk at> writes:

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

> Is it?  Is it definitely prohibited to have a zero length path
> segment.

FWIW, on Linux, the system calls (stat, open, etc), and thus the
fileutils, seem to treat it as above, a strace of ls gives me:

  stat64("/tmp///////foo//////", {st_mode=S_IFDIR|0755, st_size=60,...}) = 0
  open("/tmp///////foo//////", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3

OTOH, emacs treats foo//bar as /bar

If I haven't seen further, it is by standing in the footprints of giants

More information about the Libraries mailing list