[Haskell-cafe] How to determine if a FilePath is a directory name
or regular file?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Tue Jun 23 09:31:08 EDT 2009
On Jun 22, 2009, at 07:37 , Duncan Coutts wrote:
> One explanation is that isBlah asks "is this thing a blah", but we're
> not asking that because there is an indirection via the filepath.
> asking "does this filepath refer to a directory" not "is this
> filename a
> directory". The latter could be a function:
> isDirectory :: FileInfo -> Bool
> along with a hypothetical
> getFileInfo :: FilePath -> IO FileInfo
> import System.Posix.Files (getFileStatus, isDirectory)
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090623/14b7dd58/PGP.bin
More information about the Haskell-Cafe