hpath-io-0.10.1: High-level IO operations on files/directories

System.Posix.FD

Description

Provides an alternative for openFd which gives us more control on what status flags to pass to the low-level open(2) call, in contrast to the unix package.

Synopsis

Documentation

Arguments

 :: RawFilePath -> OpenMode -> [Flags] status flags of open(2) -> Maybe FileMode Just x => creates the file with the given modes, Nothing => the file must exist. -> IO Fd

Open and optionally create this file. See Files for information on how to use the FileMode type.

Note that passing Just x as the 4th argument triggers the oCreat status flag, which must be set when you pass in oExcl to the status flags. Also see the manpage for open(2).