Module File.Is

Predicates testing the type of a file.

These functions all follow symlinks, with the exception of Is.link. The rationale is that, for example. a symlink to a directory is usually just as good when you need a directory, so dir fn should return true.

In the case where this isn't correct, you will have to call, e.g.:

val reg : string -> bool

(reg fn) is true iff fn is a regular file.

val dir : string -> bool

(dir fn) is true iff fn is a directory.

val chr : string -> bool

(chr fn) is true iff fn is a character special file.

val blk : string -> bool

(blk fn) is true iff fn is a block special file.

(link fn) is true iff fn is a symbolic link.

val fifo : string -> bool

(fifo fn) is true iff fn is a fifo (named pipe).

val sock : string -> bool

(sock fn) is true iff fn is a socket.