The Standard ML Basis Library

The POSIX_FLAGS signature

The POSIX_FLAGS signature defines a generic set of operations on an abstract representation of system flags. It is included in various flag substructures of the other POSIX interfaces.


signature POSIX_FLAGS


eqtype flags
val toWord : flags -> SysWord.word
val wordTo : SysWord.word -> flags
val flags : flags list -> flags
val allSet : (flags * flags) -> bool
val anySet : (flags * flags) -> bool


eqtype flags
This is the abstract representation of a set of system flags.

toWord flags
wordTo w
these functions convert between the abstract flags type and a bit-vector that is represented as a system word. The interpretation of the bits is system dependent, but follows the Posix C-language binding for the host operating system. Note that there is no error checking on the wordTo function's argument.

flags l
returns a value that represents the union of the flags in the list l. The expression flags [] denotes the empty set.

allSet (fl1, fl2)
returns true if all of the flags in fl1 are also in fl2 (i.e., this tests for inclusion of fl1 in fl2).

anySet (fl1, fl2)
returns true if any of the flags in fl1 is also in fl2 (i.e., this tests for non-empty intersection).

See Also

Posix, Posix.FileSys, Posix.IO, Posix.FileSys, SysWord

[ INDEX | TOP | Parent | Root ]

Last Modified April 9, 1996
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies