
7 Aug
2003
7 Aug
'03
12:49 p.m.
On Wed, 6 Aug 2003, Simon Marlow wrote:
-- TODO: what if a file refers to a FIFO? fileInputStream :: File -> FileOffset -> IO FileInputStream fileOutputStream :: File -> FileOffset -> IO FileOutputStream
Part of my original design was that File values always refer to random-access files. Most of the operations on Files make no sense with anything else. openFile might succeed on something like /dev/kmem (although I'm not convinced that this is type-safe :-), but to open a FIFO you had to use openXputStream instead. This avoids the questions raised by using the functions above on non-seekable handles (What would the FileOffset argument mean? and What happens if you put more than one input or output stream on the same FIFO?). -- Ben