/usr/share/doc/libghc-unix-compat-doc/html/System-PosixCompat-Files.html is in libghc-unix-compat-doc 0.4.0.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.PosixCompat.Files</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-PosixCompat-Files.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-PosixCompat-Files.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">unix-compat-0.4.0.0: Portable POSIX-compatibility layer.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">System.PosixCompat.Files</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">File modes
</a><ul><li><a href="#g:2">Setting file modes
</a></li><li><a href="#g:3">Checking file existence and permissions
</a></li></ul></li><li><a href="#g:4">File status
</a><ul><li><a href="#g:5">Obtaining file status
</a></li><li><a href="#g:6">Querying file status
</a></li></ul></li><li><a href="#g:7">Creation
</a></li><li><a href="#g:8">Hard links
</a></li><li><a href="#g:9">Symbolic links
</a></li><li><a href="#g:10">Renaming files
</a></li><li><a href="#g:11">Changing file ownership
</a></li><li><a href="#g:12">Changing file timestamps
</a></li><li><a href="#g:13">Setting file sizes
</a></li><li><a href="#g:14">Find system-specific limits for a file
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module makes the operations exported by <code>System.Posix.Files</code>
available on all platforms. On POSIX systems it re-exports operations from
<code>System.Posix.Files</code>. On other platforms it emulates the operations as far
as possible.
</p><p>/NOTE: the portable implementations are not well tested, in some cases
functions are only stubs./
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:unionFileModes">unionFileModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:intersectFileModes">intersectFileModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:nullFileMode">nullFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:ownerReadMode">ownerReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:ownerWriteMode">ownerWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:ownerExecuteMode">ownerExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:ownerModes">ownerModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:groupReadMode">groupReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:groupWriteMode">groupWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:groupExecuteMode">groupExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:groupModes">groupModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:otherReadMode">otherReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:otherWriteMode">otherWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:otherExecuteMode">otherExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:otherModes">otherModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:setUserIDMode">setUserIDMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:setGroupIDMode">setGroupIDMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:stdFileMode">stdFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:accessModes">accessModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:setFileMode">setFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFdMode">setFdMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFileCreationMask">setFileCreationMask</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:fileAccess">fileAccess</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:fileExist">fileExist</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:FileStatus">FileStatus</a> </li><li class="src short"><a href="#v:getFileStatus">getFileStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></li><li class="src short"><a href="#v:getFdStatus">getFdStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></li><li class="src short"><a href="#v:getSymbolicLinkStatus">getSymbolicLinkStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></li><li class="src short"><a href="#v:deviceID">deviceID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a></li><li class="src short"><a href="#v:fileID">fileID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileID">FileID</a></li><li class="src short"><a href="#v:fileMode">fileMode</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></li><li class="src short"><a href="#v:linkCount">linkCount</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:LinkCount">LinkCount</a></li><li class="src short"><a href="#v:fileOwner">fileOwner</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a></li><li class="src short"><a href="#v:fileGroup">fileGroup</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a></li><li class="src short"><a href="#v:specialDeviceID">specialDeviceID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a></li><li class="src short"><a href="#v:fileSize">fileSize</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a></li><li class="src short"><a href="#v:accessTime">accessTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></li><li class="src short"><a href="#v:modificationTime">modificationTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></li><li class="src short"><a href="#v:statusChangeTime">statusChangeTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></li><li class="src short"><a href="#v:isBlockDevice">isBlockDevice</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isCharacterDevice">isCharacterDevice</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isNamedPipe">isNamedPipe</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isRegularFile">isRegularFile</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isDirectory">isDirectory</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSymbolicLink">isSymbolicLink</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSocket">isSocket</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:createNamedPipe">createNamedPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createDevice">createDevice</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createLink">createLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:removeLink">removeLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createSymbolicLink">createSymbolicLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:readSymbolicLink">readSymbolicLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:rename">rename</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setOwnerAndGroup">setOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFdOwnerAndGroup">setFdOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setSymbolicLinkOwnerAndGroup">setSymbolicLinkOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFileTimes">setFileTimes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:touchFile">touchFile</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFileSize">setFileSize</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setFdSize">setFdSize</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:PathVar">PathVar</a> <ul class="subs"><li>= <a href="#v:FileSizeBits">FileSizeBits</a> </li><li>| <a href="#v:LinkLimit">LinkLimit</a> </li><li>| <a href="#v:InputLineLimit">InputLineLimit</a> </li><li>| <a href="#v:InputQueueLimit">InputQueueLimit</a> </li><li>| <a href="#v:FileNameLimit">FileNameLimit</a> </li><li>| <a href="#v:PathNameLimit">PathNameLimit</a> </li><li>| <a href="#v:PipeBufferLimit">PipeBufferLimit</a> </li><li>| <a href="#v:SymbolicLinkLimit">SymbolicLinkLimit</a> </li><li>| <a href="#v:SetOwnerAndGroupIsRestricted">SetOwnerAndGroupIsRestricted</a> </li><li>| <a href="#v:FileNamesAreNotTruncated">FileNamesAreNotTruncated</a> </li><li>| <a href="#v:VDisableChar">VDisableChar</a> </li><li>| <a href="#v:AsyncIOAvailable">AsyncIOAvailable</a> </li><li>| <a href="#v:PrioIOAvailable">PrioIOAvailable</a> </li><li>| <a href="#v:SyncIOAvailable">SyncIOAvailable</a> </li></ul></li><li class="src short"><a href="#v:getPathVar">getPathVar</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="System-PosixCompat-Files.html#t:PathVar">PathVar</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Limit">Limit</a></li><li class="src short"><a href="#v:getFdPathVar">getFdPathVar</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="System-PosixCompat-Files.html#t:PathVar">PathVar</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Limit">Limit</a></li></ul></div><div id="interface"><h1 id="g:1">File modes
</h1><div class="top"><p class="src"><a name="v:unionFileModes" class="def">unionFileModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Combines the two file modes into one that contains modes that appear in
either.
</p></div></div><div class="top"><p class="src"><a name="v:intersectFileModes" class="def">intersectFileModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Combines two file modes into one that only contains modes that appear in
both.
</p></div></div><div class="top"><p class="src"><a name="v:nullFileMode" class="def">nullFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>No permissions.
</p></div></div><div class="top"><p class="src"><a name="v:ownerReadMode" class="def">ownerReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner has read permission.
</p></div></div><div class="top"><p class="src"><a name="v:ownerWriteMode" class="def">ownerWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner has write permission.
</p></div></div><div class="top"><p class="src"><a name="v:ownerExecuteMode" class="def">ownerExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner has execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:ownerModes" class="def">ownerModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner has read, write and execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:groupReadMode" class="def">groupReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Group has read permission.
</p></div></div><div class="top"><p class="src"><a name="v:groupWriteMode" class="def">groupWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Group has write permission.
</p></div></div><div class="top"><p class="src"><a name="v:groupExecuteMode" class="def">groupExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Group has execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:groupModes" class="def">groupModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Group has read, write and execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:otherReadMode" class="def">otherReadMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Others have read permission.
</p></div></div><div class="top"><p class="src"><a name="v:otherWriteMode" class="def">otherWriteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Others have write permission.
</p></div></div><div class="top"><p class="src"><a name="v:otherExecuteMode" class="def">otherExecuteMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Others have execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:otherModes" class="def">otherModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Others have read, write and execute permission.
</p></div></div><div class="top"><p class="src"><a name="v:setUserIDMode" class="def">setUserIDMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Set user ID on execution.
</p></div></div><div class="top"><p class="src"><a name="v:setGroupIDMode" class="def">setGroupIDMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Set group ID on execution.
</p></div></div><div class="top"><p class="src"><a name="v:stdFileMode" class="def">stdFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner, group and others have read and write permission.
</p></div></div><div class="top"><p class="src"><a name="v:accessModes" class="def">accessModes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>Owner, group and others have read, write and execute permission.
</p></div></div><h2 id="g:2">Setting file modes
</h2><div class="top"><p class="src"><a name="v:setFileMode" class="def">setFileMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>setFileMode path mode</code> changes permission of the file given by <code>path</code>
to <code>mode</code>. This operation may fail with <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Error.html#v:throwErrnoPathIfMinus1_">throwErrnoPathIfMinus1_</a></code> if <code>path</code>
doesn't exist or if the effective user ID of the current process is not that
of the file's owner.
</p><p>Note: calls <code>chmod</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setFdMode" class="def">setFdMode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>setFdMode fd mode</code> acts like <code>setFileMode</code> but uses a file descriptor
<code>fd</code> instead of a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></code>.
</p><p>Note: calls <code>fchmod</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setFileCreationMask" class="def">setFileCreationMask</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p><code>setFileCreationMask mode</code> sets the file mode creation mask to <code>mode</code>.
Modes set by this operation are subtracted from files and directories upon
creation. The previous file creation mask is returned.
</p><p>Note: calls <code>umask</code>.
</p></div></div><h2 id="g:3">Checking file existence and permissions
</h2><div class="top"><p class="src"><a name="v:fileAccess" class="def">fileAccess</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p><code>fileAccess name read write exec</code> checks if the file (or other file system
object) <code>name</code> can be accessed for reading, writing and/or executing. To
check a permission set the corresponding argument to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#v:True">True</a></code>.
</p><p>Note: calls <code>access</code>.
</p></div></div><div class="top"><p class="src"><a name="v:fileExist" class="def">fileExist</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks for the existence of the file.
</p><p>Note: calls <code>access</code>.
</p></div></div><h1 id="g:4">File status
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FileStatus" class="def">FileStatus</a> </p><div class="doc"><p>POSIX defines operations to get information, such as owner, permissions,
size and access times, about a file. This information is represented by the
<code><a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></code> type.
</p><p>Note: see <code>chmod</code>.
</p></div></div><h2 id="g:5">Obtaining file status
</h2><div class="top"><p class="src"><a name="v:getFileStatus" class="def">getFileStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></p><div class="doc"><p><code>getFileStatus path</code> calls gets the <code>FileStatus</code> information (user ID,
size, access times, etc.) for the file <code>path</code>.
</p><p>Note: calls <code>stat</code>.
</p></div></div><div class="top"><p class="src"><a name="v:getFdStatus" class="def">getFdStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></p><div class="doc"><p><code>getFdStatus fd</code> acts as <code>getFileStatus</code> but uses a file descriptor <code>fd</code>.
</p><p>Note: calls <code>fstat</code>.
</p></div></div><div class="top"><p class="src"><a name="v:getSymbolicLinkStatus" class="def">getSymbolicLinkStatus</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a></p><div class="doc"><p>Acts as <code><a href="System-PosixCompat-Files.html#v:getFileStatus">getFileStatus</a></code> except when the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></code> refers to a symbolic
link. In that case the <code>FileStatus</code> information of the symbolic link itself
is returned instead of that of the file it points to.
</p><p>Note: calls <code>lstat</code>.
</p></div></div><h2 id="g:6">Querying file status
</h2><div class="top"><p class="src"><a name="v:deviceID" class="def">deviceID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a></p><div class="doc"><p>ID of the device on which this file resides.
</p></div></div><div class="top"><p class="src"><a name="v:fileID" class="def">fileID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileID">FileID</a></p><div class="doc"><p>inode number
</p></div></div><div class="top"><p class="src"><a name="v:fileMode" class="def">fileMode</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a></p><div class="doc"><p>File mode (such as permissions).
</p></div></div><div class="top"><p class="src"><a name="v:linkCount" class="def">linkCount</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:LinkCount">LinkCount</a></p><div class="doc"><p>Number of hard links to this file.
</p></div></div><div class="top"><p class="src"><a name="v:fileOwner" class="def">fileOwner</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a></p><div class="doc"><p>ID of owner.
</p></div></div><div class="top"><p class="src"><a name="v:fileGroup" class="def">fileGroup</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a></p><div class="doc"><p>ID of group.
</p></div></div><div class="top"><p class="src"><a name="v:specialDeviceID" class="def">specialDeviceID</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a></p><div class="doc"><p>Describes the device that this file represents.
</p></div></div><div class="top"><p class="src"><a name="v:fileSize" class="def">fileSize</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a></p><div class="doc"><p>Size of the file in bytes. If this file is a symbolic link the size is
the length of the pathname it contains.
</p></div></div><div class="top"><p class="src"><a name="v:accessTime" class="def">accessTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></p><div class="doc"><p>Time of last access.
</p></div></div><div class="top"><p class="src"><a name="v:modificationTime" class="def">modificationTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></p><div class="doc"><p>Time of last modification.
</p></div></div><div class="top"><p class="src"><a name="v:statusChangeTime" class="def">statusChangeTime</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a></p><div class="doc"><p>Time of last status change (i.e. owner, group, link count, mode, etc.).
</p></div></div><div class="top"><p class="src"><a name="v:isBlockDevice" class="def">isBlockDevice</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a block device.
</p></div></div><div class="top"><p class="src"><a name="v:isCharacterDevice" class="def">isCharacterDevice</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a character device.
</p></div></div><div class="top"><p class="src"><a name="v:isNamedPipe" class="def">isNamedPipe</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a named pipe device.
</p></div></div><div class="top"><p class="src"><a name="v:isRegularFile" class="def">isRegularFile</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a regular file device.
</p></div></div><div class="top"><p class="src"><a name="v:isDirectory" class="def">isDirectory</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a directory device.
</p></div></div><div class="top"><p class="src"><a name="v:isSymbolicLink" class="def">isSymbolicLink</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a symbolic link device.
</p></div></div><div class="top"><p class="src"><a name="v:isSocket" class="def">isSocket</a> :: <a href="System-PosixCompat-Files.html#t:FileStatus">FileStatus</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Checks if this file is a socket device.
</p></div></div><h1 id="g:7">Creation
</h1><div class="top"><p class="src"><a name="v:createNamedPipe" class="def">createNamedPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>createNamedPipe fifo mode</code>
creates a new named pipe, <code>fifo</code>, with permissions based on
<code>mode</code>. May fail with <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Error.html#v:throwErrnoPathIfMinus1_">throwErrnoPathIfMinus1_</a></code> if a file named <code>name</code>
already exists or if the effective user ID of the current process doesn't
have permission to create the pipe.
</p><p>Note: calls <code>mkfifo</code>.
</p></div></div><div class="top"><p class="src"><a name="v:createDevice" class="def">createDevice</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileMode">FileMode</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:DeviceID">DeviceID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>createDevice path mode dev</code> creates either a regular or a special file
depending on the value of <code>mode</code> (and <code>dev</code>). <code>mode</code> will normally be either
<code><a href="/usr/share/doc/ghc-doc/html/libraries/unix-2.6.0.1/System-Posix-Files-ByteString.html#v:blockSpecialMode">blockSpecialMode</a></code> or <code><a href="/usr/share/doc/ghc-doc/html/libraries/unix-2.6.0.1/System-Posix-Files-ByteString.html#v:characterSpecialMode">characterSpecialMode</a></code>. May fail with
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Foreign-C-Error.html#v:throwErrnoPathIfMinus1_">throwErrnoPathIfMinus1_</a></code> if a file named <code>name</code> already exists or if the
effective user ID of the current process doesn't have permission to create
the file.
</p><p>Note: calls <code>mknod</code>.
</p></div></div><h1 id="g:8">Hard links
</h1><div class="top"><p class="src"><a name="v:createLink" class="def">createLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>createLink old new</code> creates a new path, <code>new</code>, linked to an existing file,
<code>old</code>.
</p><p>Note: calls <code>link</code>.
</p></div></div><div class="top"><p class="src"><a name="v:removeLink" class="def">removeLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>removeLink path</code> removes the link named <code>path</code>.
</p><p>Note: calls <code>unlink</code>.
</p></div></div><h1 id="g:9">Symbolic links
</h1><div class="top"><p class="src"><a name="v:createSymbolicLink" class="def">createSymbolicLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>createSymbolicLink file1 file2</code> creates a symbolic link named <code>file2</code>
which points to the file <code>file1</code>.
</p><p>Symbolic links are interpreted at run-time as if the contents of the link
had been substituted into the path being followed to find a file or directory.
</p><p>Note: calls <code>symlink</code>.
</p></div></div><div class="top"><p class="src"><a name="v:readSymbolicLink" class="def">readSymbolicLink</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></p><div class="doc"><p>Reads the <code>FilePath</code> pointed to by the symbolic link and returns it.
</p><p>Note: calls <code>readlink</code>.
</p></div></div><h1 id="g:10">Renaming files
</h1><div class="top"><p class="src"><a name="v:rename" class="def">rename</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>rename old new</code> renames a file or directory from <code>old</code> to <code>new</code>.
</p><p>Note: calls <code>rename</code>.
</p></div></div><h1 id="g:11">Changing file ownership
</h1><div class="top"><p class="src"><a name="v:setOwnerAndGroup" class="def">setOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>setOwnerAndGroup path uid gid</code> changes the owner and group of <code>path</code> to
<code>uid</code> and <code>gid</code>, respectively.
</p><p>If <code>uid</code> or <code>gid</code> is specified as -1, then that ID is not changed.
</p><p>Note: calls <code>chown</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setFdOwnerAndGroup" class="def">setFdOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Acts as <code>setOwnerAndGroup</code> but uses a file descriptor instead of a
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></code>.
</p><p>Note: calls <code>fchown</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setSymbolicLinkOwnerAndGroup" class="def">setSymbolicLinkOwnerAndGroup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:UserID">UserID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:GroupID">GroupID</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Acts as <code><a href="System-PosixCompat-Files.html#v:setOwnerAndGroup">setOwnerAndGroup</a></code> but does not follow symlinks (and thus
changes permissions on the link itself).
</p><p>Note: calls <code>lchown</code>.
</p></div></div><h1 id="g:12">Changing file timestamps
</h1><div class="top"><p class="src"><a name="v:setFileTimes" class="def">setFileTimes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:EpochTime">EpochTime</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>setFileTimes path atime mtime</code> sets the access and modification times
associated with file <code>path</code> to <code>atime</code> and <code>mtime</code>, respectively.
</p><p>Note: calls <code>utime</code>.
</p></div></div><div class="top"><p class="src"><a name="v:touchFile" class="def">touchFile</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code>touchFile path</code> sets the access and modification times associated with
file <code>path</code> to the current time.
</p><p>Note: calls <code>utime</code>.
</p></div></div><h1 id="g:13">Setting file sizes
</h1><div class="top"><p class="src"><a name="v:setFileSize" class="def">setFileSize</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Truncates the file down to the specified length. If the file was larger
than the given length before this operation was performed the extra is lost.
</p><p>Note: calls <code>truncate</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setFdSize" class="def">setFdSize</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:FileOffset">FileOffset</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Acts as <code>setFileSize</code> but uses a file descriptor instead of a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a></code>.
</p><p>Note: calls <code>ftruncate</code>.
</p></div></div><h1 id="g:14">Find system-specific limits for a file
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PathVar" class="def">PathVar</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FileSizeBits" class="def">FileSizeBits</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:LinkLimit" class="def">LinkLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InputLineLimit" class="def">InputLineLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:InputQueueLimit" class="def">InputQueueLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FileNameLimit" class="def">FileNameLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PathNameLimit" class="def">PathNameLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PipeBufferLimit" class="def">PipeBufferLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SymbolicLinkLimit" class="def">SymbolicLinkLimit</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SetOwnerAndGroupIsRestricted" class="def">SetOwnerAndGroupIsRestricted</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:FileNamesAreNotTruncated" class="def">FileNamesAreNotTruncated</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:VDisableChar" class="def">VDisableChar</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:AsyncIOAvailable" class="def">AsyncIOAvailable</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PrioIOAvailable" class="def">PrioIOAvailable</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:SyncIOAvailable" class="def">SyncIOAvailable</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:getPathVar" class="def">getPathVar</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:FilePath">FilePath</a> -> <a href="System-PosixCompat-Files.html#t:PathVar">PathVar</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Limit">Limit</a></p><div class="doc"><p><code>getPathVar var path</code> obtains the dynamic value of the requested
configurable file limit or option associated with file or directory <code>path</code>.
For defined file limits, <code>getPathVar</code> returns the associated
value. For defined file options, the result of <code>getPathVar</code>
is undefined, but not failure.
</p><p>Note: calls <code>pathconf</code>.
</p></div></div><div class="top"><p class="src"><a name="v:getFdPathVar" class="def">getFdPathVar</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Fd">Fd</a> -> <a href="System-PosixCompat-Files.html#t:PathVar">PathVar</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Posix-Types.html#t:Limit">Limit</a></p><div class="doc"><p><code>getFdPathVar var fd</code> obtains the dynamic value of the requested
configurable file limit or option associated with the file or directory
attached to the open channel <code>fd</code>. For defined file limits, <code>getFdPathVar</code>
returns the associated value. For defined file options, the result of
<code>getFdPathVar</code> is undefined, but not failure.
</p><p>Note: calls <code>fpathconf</code>.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|