[Haskell-cafe] Exclusive mode in openFile

Max Bolingbroke batterseapower at hotmail.com
Tue Jun 28 22:05:49 CEST 2011


On 28 June 2011 18:56, Gracjan Polak <gracjanpolak at gmail.com> wrote:
> Anyway, where do I find an 'openFileShared' function? Packages unix/Win32 do not
> have obvious leads...

Perhaps the functions in System.Posix.IO do what you want?
http://hackage.haskell.org/packages/archive/unix/2.4.2.0/doc/html/System-Posix-IO.html.
The equivalent on the Win32 side is CreateFile:
http://hackage.haskell.org/packages/archive/Win32/2.2.0.2/doc/html/System-Win32-File.html

There is a way to create a Handle from a Fd
(http://hackage.haskell.org/packages/archive/base/latest/doc/html/GHC-IO-Handle-FD.html#v:fdToHandle),
but I'm not sure if there is an equivalent to build a Handle from a
Win32 HANDLE...

Hope those pointers help...

Max



More information about the Haskell-Cafe mailing list