<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>System.Posix.FD</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="src/System-Posix-FD.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">hpath-0.8.0: Support for well-typed paths</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Copyright</th><td>© 2016 Julian Ospald</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>Julian Ospald <hasufell@posteo.de></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">System.Posix.FD</p></div><divid="description"><pclass="caption">Description</p><divclass="doc"><p>Provides an alternative for <code><ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-IO-ByteString.html#v:openFd">openFd</a></code>
low-level <code>open(2)</code> call, in contrast to the unix package.</p></div></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short"><ahref="#v:openFd">openFd</a> :: <ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-ByteString-FilePath.html#t:RawFilePath">RawFilePath</a> -><ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-IO-ByteString.html#t:OpenMode">OpenMode</a> -> [<ahref="System-Posix-Directory-Foreign.html#t:Flags">Flags</a>] -><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-Posix-Types.html#t:FileMode">FileMode</a> -><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-Posix-Types.html#t:Fd">Fd</a></li></ul></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><aname="v:openFd"class="def">openFd</a><ahref="src/System-Posix-FD.html#openFd"class="link">Source</a></p><divclass="subs arguments"><pclass="caption">Arguments</p><table><tr><tdclass="src">:: <ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-ByteString-FilePath.html#t:RawFilePath">RawFilePath</a></td><tdclass="doc empty"> </td></tr><tr><tdclass="src">-><ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix-IO-ByteString.html#t:OpenMode">OpenMode</a></td><tdclass="doc empty"> </td></tr><tr><tdclass="src">-> [<ahref="System-Posix-Directory-Foreign.html#t:Flags">Flags</a>]</td><tdclass="doc"><p>status flags of <code>open(2)</code></p></td></tr><tr><tdclass="src">-><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-Maybe.html#t:Maybe">Maybe</a><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-Posix-Types.html#t:FileMode">FileMode</a></td><tdclass="doc"><p><code>Just x</code> => creates the file with the given modes, Nothing => the file must exist.</p></td></tr><tr><tdclass="src">-><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html#t:IO">IO</a><ahref="https://hackage.haskell.org/package/base-4.8.1.0/docs/System-Posix-Types.html#t:Fd">Fd</a></td><tdclass="doc empty"> </td></tr></table></div><divclass="doc"><p>Open and optionally create this file. See <code><ahref="https://hackage.haskell.org/package/unix-2.7.1.0/docs/System-Posix.html#v:Files">Files</a></code>
for information on how to use the <code>FileMode</code> type.</p><p>Note that passing <code>Just x</code> as the 4th argument triggers the
<code><ahref="System-Posix-Directory-Foreign.html#v:oCreat">oCreat</a></code> status flag, which must be set when you pass in <code><ahref="System-Posix-Directory-Foreign.html#v:oExcl">oExcl</a></code>
to the status flags. Also see the manpage for <code>open(2)</code>.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>