[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 22:21:47 EDT 2009
On Jun 23, 2009, at 10:34 , Duncan Coutts wrote:
> On Tue, 2009-06-23 at 09:31 -0400, Brandon S. Allbery KF8NH wrote:
>> Hypothetical?
>>
>>> import System.Posix.Files (getFileStatus, isDirectory)
>
> Yeah, if we could make a standard portable variant of this, that'd be
> great.
I've wanted to do that ever since I tripped over it implementing the
original filetests in pugs; I know it can be done with some
genericness but don't know enough win32 to do it.
One question is what to do with the non-generic stuff. For example,
Win32 doesn't have symbolic links, but does have reparse points which
are sort of similar if you squint; they're a superset of symlink
functionality. (The closest thing Unix (not POSIX) has is
mountpoints, but those are userspace aside from . and .. being the
same inode. POSIX doesn't touch this space, IIRC, because there are
POSIX implementations for Win32 (no mountpoints, some implementations
may use reparse points to simulate them) and OpenVMS (no mountpoints).)
--
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...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090623/a5067046/PGP.bin
More information about the Haskell-Cafe
mailing list