
23 Jun
2009
23 Jun
'09
1:31 p.m.
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. We're 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
Hypothetical?
import System.Posix.Files (getFileStatus, isDirectory)
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH