[Haskell-cafe] How to determine if a FilePath is a directory name
or regular file?
max.rabkin at gmail.com
Mon Jun 22 08:32:41 EDT 2009
On Mon, Jun 22, 2009 at 2:09 PM, Deniz Dogan<deniz.a.m.dogan at gmail.com> wrote:
> I think see what you mean, but I find the argument more of an excuse
> to the poor naming than a solid argument for it. Following the
> convention and intuition that most users have should be more important
> than making the (sometimes unnecessary) distinction between a
> directory and the path to it.
I disagree. (isDirectory "/no/such/directory/") should equal true: the
given FilePath is a directory path (on Unix), since it ends with a
slash. However (doesDirectoryExist "/no/such/directory") should return
false, since there is no such directory.
> Deniz Dogan
More information about the Haskell-Cafe