[MLton] OS.FileSys.isDir
Stephen Weeks
MLton@mlton.org
Mon, 4 Apr 2005 23:12:17 -0700
> Under MoscowML, isDir returns false for symbolic links that are
> links to directories. Under MLton, isDir returns true. Which is
> correct?
Hmmm. All the implementations of SML that I have, including Moscow
ML, return true. The MLton implementation of OS.FileSys.isDir uses
the Posix stat() system call followed by S_ISDIR, just as I expect the
other implementations do when on a Unixish system. I can't imagine
how returning false is the right behavior. If you want to look at a
symbolic link, use Posix.FileSys.lstat.