<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >System.Posix.Files</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_System-Posix-Files.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >unix-2.3.2.0: POSIX functionality</TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >System.Posix.Files</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >non-portable (requires POSIX)</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >provisional</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >libraries@haskell.org</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" ><B >Contents</B ></TD ></TR ><TR ><TD ><DL ><DT ><A HREF="#1" >File modes </A ></DT ><DD ><DL ><DT ><A HREF="#2" >Setting file modes </A ></DT ><DT ><A HREF="#3" >Checking file existence and permissions </A ></DT ></DL ></DD ><DT ><A HREF="#4" >File status </A ></DT ><DD ><DL ><DT ><A HREF="#5" >Obtaining file status </A ></DT ><DT ><A HREF="#6" >Querying file status </A ></DT ></DL ></DD ><DT ><A HREF="#7" >Creation </A ></DT ><DT ><A HREF="#8" >Hard links </A ></DT ><DT ><A HREF="#9" >Symbolic links </A ></DT ><DT ><A HREF="#10" >Renaming files </A ></DT ><DT ><A HREF="#11" >Changing file ownership </A ></DT ><DT ><A HREF="#12" >Changing file timestamps </A ></DT ><DT ><A HREF="#13" >Setting file sizes </A ></DT ><DT ><A HREF="#14" >Find system-specific limits for a file </A ></DT ></DL ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P >Functions defined by the POSIX standards for manipulating and querying the file system. Names of underlying POSIX functions are indicated whenever possible. A more complete documentation of the POSIX functions together with a more detailed description of different error conditions are usually available in the system's manual pages or from <A HREF="http://www.unix.org/version3/online.html" >http://www.unix.org/version3/online.html</A > (free registration required). </P ><P >When a function that calls an underlying POSIX function fails, the errno code is converted to an <TT ><A HREF="../base/System-IO-Error.html#t%3AIOError" >IOError</A ></TT > using Foreign.C.Error.errnoToIOError. For a list of which errno codes may be generated, consult the POSIX documentation for the underlying function. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AunionFileModes" >unionFileModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AintersectFileModes" >intersectFileModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AnullFileMode" >nullFileMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AownerReadMode" >ownerReadMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AownerWriteMode" >ownerWriteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AownerExecuteMode" >ownerExecuteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AownerModes" >ownerModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgroupReadMode" >groupReadMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgroupWriteMode" >groupWriteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgroupExecuteMode" >groupExecuteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgroupModes" >groupModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AotherReadMode" >otherReadMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AotherWriteMode" >otherWriteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AotherExecuteMode" >otherExecuteMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AotherModes" >otherModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetUserIDMode" >setUserIDMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetGroupIDMode" >setGroupIDMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AstdFileMode" >stdFileMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AaccessModes" >accessModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileTypeModes" >fileTypeModes</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AblockSpecialMode" >blockSpecialMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcharacterSpecialMode" >characterSpecialMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AnamedPipeMode" >namedPipeMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AregularFileMode" >regularFileMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AdirectoryMode" >directoryMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsymbolicLinkMode" >symbolicLinkMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsocketMode" >socketMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFileMode" >setFileMode</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFdMode" >setFdMode</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFileCreationMask" >setFileCreationMask</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileAccess" >fileAccess</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileExist" >fileExist</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AFileStatus" >FileStatus</A > </TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetFileStatus" >getFileStatus</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetFdStatus" >getFdStatus</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetSymbolicLinkStatus" >getSymbolicLinkStatus</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AdeviceID" >deviceID</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileID" >fileID</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileID" >FileID</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileMode" >fileMode</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AlinkCount" >linkCount</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ALinkCount" >LinkCount</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileOwner" >fileOwner</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileGroup" >fileGroup</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AspecialDeviceID" >specialDeviceID</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AfileSize" >fileSize</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AaccessTime" >accessTime</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AmodificationTime" >modificationTime</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AstatusChangeTime" >statusChangeTime</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisBlockDevice" >isBlockDevice</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisCharacterDevice" >isCharacterDevice</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisNamedPipe" >isNamedPipe</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisRegularFile" >isRegularFile</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisDirectory" >isDirectory</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisSymbolicLink" >isSymbolicLink</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AisSocket" >isSocket</A > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcreateNamedPipe" >createNamedPipe</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcreateDevice" >createDevice</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcreateLink" >createLink</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AremoveLink" >removeLink</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcreateSymbolicLink" >createSymbolicLink</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreadSymbolicLink" >readSymbolicLink</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Arename" >rename</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetOwnerAndGroup" >setOwnerAndGroup</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFdOwnerAndGroup" >setFdOwnerAndGroup</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetSymbolicLinkOwnerAndGroup" >setSymbolicLinkOwnerAndGroup</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFileTimes" >setFileTimes</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AtouchFile" >touchFile</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFileSize" >setFileSize</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsetFdSize" >setFdSize</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3APathVar" >PathVar</A > </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" >= <A HREF="#v%3AFileSizeBits" >FileSizeBits</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3ALinkLimit" >LinkLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AInputLineLimit" >InputLineLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AInputQueueLimit" >InputQueueLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AFileNameLimit" >FileNameLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3APathNameLimit" >PathNameLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3APipeBufferLimit" >PipeBufferLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3ASymbolicLinkLimit" >SymbolicLinkLimit</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3ASetOwnerAndGroupIsRestricted" >SetOwnerAndGroupIsRestricted</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AFileNamesAreNotTruncated" >FileNamesAreNotTruncated</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AVDisableChar" >VDisableChar</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3AAsyncIOAvailable" >AsyncIOAvailable</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3APrioIOAvailable" >PrioIOAvailable</A ></TD ></TR ><TR ><TD CLASS="decl" >| <A HREF="#v%3ASyncIOAvailable" >SyncIOAvailable</A ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetPathVar" >getPathVar</A > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="System-Posix-Files.html#t%3APathVar" >PathVar</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3ALimit" >Limit</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetFdPathVar" >getFdPathVar</A > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="System-Posix-Files.html#t%3APathVar" >PathVar</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3ALimit" >Limit</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="1" ><A NAME="1" >File modes </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:unionFileModes" ><A NAME="v%3AunionFileModes" ></A ></A ><B >unionFileModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Combines the two file modes into one that contains modes that appear in either. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:intersectFileModes" ><A NAME="v%3AintersectFileModes" ></A ></A ><B >intersectFileModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Combines two file modes into one that only contains modes that appear in both. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:nullFileMode" ><A NAME="v%3AnullFileMode" ></A ></A ><B >nullFileMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >No permissions. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ownerReadMode" ><A NAME="v%3AownerReadMode" ></A ></A ><B >ownerReadMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner has read permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ownerWriteMode" ><A NAME="v%3AownerWriteMode" ></A ></A ><B >ownerWriteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner has write permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ownerExecuteMode" ><A NAME="v%3AownerExecuteMode" ></A ></A ><B >ownerExecuteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner has execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ownerModes" ><A NAME="v%3AownerModes" ></A ></A ><B >ownerModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner has read, write and execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:groupReadMode" ><A NAME="v%3AgroupReadMode" ></A ></A ><B >groupReadMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Group has read permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:groupWriteMode" ><A NAME="v%3AgroupWriteMode" ></A ></A ><B >groupWriteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Group has write permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:groupExecuteMode" ><A NAME="v%3AgroupExecuteMode" ></A ></A ><B >groupExecuteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Group has execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:groupModes" ><A NAME="v%3AgroupModes" ></A ></A ><B >groupModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Group has read, write and execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:otherReadMode" ><A NAME="v%3AotherReadMode" ></A ></A ><B >otherReadMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Others have read permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:otherWriteMode" ><A NAME="v%3AotherWriteMode" ></A ></A ><B >otherWriteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Others have write permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:otherExecuteMode" ><A NAME="v%3AotherExecuteMode" ></A ></A ><B >otherExecuteMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Others have execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:otherModes" ><A NAME="v%3AotherModes" ></A ></A ><B >otherModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Others have read, write and execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setUserIDMode" ><A NAME="v%3AsetUserIDMode" ></A ></A ><B >setUserIDMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Set user ID on execution. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setGroupIDMode" ><A NAME="v%3AsetGroupIDMode" ></A ></A ><B >setGroupIDMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Set group ID on execution. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:stdFileMode" ><A NAME="v%3AstdFileMode" ></A ></A ><B >stdFileMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner, group and others have read and write permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:accessModes" ><A NAME="v%3AaccessModes" ></A ></A ><B >accessModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >Owner, group and others have read, write and execute permission. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileTypeModes" ><A NAME="v%3AfileTypeModes" ></A ></A ><B >fileTypeModes</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:blockSpecialMode" ><A NAME="v%3AblockSpecialMode" ></A ></A ><B >blockSpecialMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:characterSpecialMode" ><A NAME="v%3AcharacterSpecialMode" ></A ></A ><B >characterSpecialMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:namedPipeMode" ><A NAME="v%3AnamedPipeMode" ></A ></A ><B >namedPipeMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:regularFileMode" ><A NAME="v%3AregularFileMode" ></A ></A ><B >regularFileMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:directoryMode" ><A NAME="v%3AdirectoryMode" ></A ></A ><B >directoryMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:symbolicLinkMode" ><A NAME="v%3AsymbolicLinkMode" ></A ></A ><B >symbolicLinkMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:socketMode" ><A NAME="v%3AsocketMode" ></A ></A ><B >socketMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="2" ><A NAME="2" >Setting file modes </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFileMode" ><A NAME="v%3AsetFileMode" ></A ></A ><B >setFileMode</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >setFileMode path mode</TT > changes permission of the file given by <TT >path</TT > to <TT >mode</TT >. This operation may fail with <TT ><A HREF="../base/Foreign-C-Error.html#v%3AthrowErrnoPathIfMinus1_" >throwErrnoPathIfMinus1_</A ></TT > if <TT >path</TT > 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 <TT >chmod</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFdMode" ><A NAME="v%3AsetFdMode" ></A ></A ><B >setFdMode</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >setFdMode fd mode</TT > acts like <TT ><A HREF="System-Posix-Files.html#v%3AsetFileMode" >setFileMode</A ></TT > but uses a file descriptor <TT >fd</TT > instead of a <TT ><A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TT >. </P ><P >Note: calls <TT >fchmod</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFileCreationMask" ><A NAME="v%3AsetFileCreationMask" ></A ></A ><B >setFileCreationMask</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >setFileCreationMask mode</TT > sets the file mode creation mask to <TT >mode</TT >. Modes set by this operation are subtracted from files and directories upon creation. The previous file creation mask is returned. </P ><P >Note: calls <TT >umask</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="3" ><A NAME="3" >Checking file existence and permissions </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileAccess" ><A NAME="v%3AfileAccess" ></A ></A ><B >fileAccess</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >fileAccess name read write exec</TT > checks if the file (or other file system object) <TT >name</TT > can be accessed for reading, writing and/or executing. To check a permission set the corresponding argument to <TT ><A HREF="../ghc-prim/GHC-Bool.html#v%3ATrue" >True</A ></TT >. </P ><P >Note: calls <TT >access</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileExist" ><A NAME="v%3AfileExist" ></A ></A ><B >fileExist</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Checks for the existence of the file. </P ><P >Note: calls <TT >access</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="4" ><A NAME="4" >File status </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:FileStatus" ><A NAME="t%3AFileStatus" ></A ></A ><B >FileStatus</B > </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" ><P >POSIX defines operations to get information, such as owner, permissions, size and access times, about a file. This information is represented by the <TT ><A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TT > type. </P ><P >Note: see <TT >chmod</TT >. </P ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="5" ><A NAME="5" >Obtaining file status </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getFileStatus" ><A NAME="v%3AgetFileStatus" ></A ></A ><B >getFileStatus</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >getFileStatus path</TT > calls gets the <TT >FileStatus</TT > information (user ID, size, access times, etc.) for the file <TT >path</TT >. </P ><P >Note: calls <TT >stat</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getFdStatus" ><A NAME="v%3AgetFdStatus" ></A ></A ><B >getFdStatus</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >getFdStatus fd</TT > acts as <TT ><A HREF="System-Posix-Files.html#v%3AgetFileStatus" >getFileStatus</A ></TT > but uses a file descriptor <TT >fd</TT >. </P ><P >Note: calls <TT >fstat</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getSymbolicLinkStatus" ><A NAME="v%3AgetSymbolicLinkStatus" ></A ></A ><B >getSymbolicLinkStatus</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Acts as <TT ><A HREF="System-Posix-Files.html#v%3AgetFileStatus" >getFileStatus</A ></TT > except when the <TT ><A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TT > refers to a symbolic link. In that case the <TT >FileStatus</TT > information of the symbolic link itself is returned instead of that of the file it points to. </P ><P >Note: calls <TT >lstat</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section2" ><A NAME="6" ><A NAME="6" >Querying file status </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:deviceID" ><A NAME="v%3AdeviceID" ></A ></A ><B >deviceID</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A ></TD ></TR ><TR ><TD CLASS="doc" >ID of the device on which this file resides. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileID" ><A NAME="v%3AfileID" ></A ></A ><B >fileID</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileID" >FileID</A ></TD ></TR ><TR ><TD CLASS="doc" >inode number </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileMode" ><A NAME="v%3AfileMode" ></A ></A ><B >fileMode</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A ></TD ></TR ><TR ><TD CLASS="doc" >File mode (such as permissions). </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:linkCount" ><A NAME="v%3AlinkCount" ></A ></A ><B >linkCount</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ALinkCount" >LinkCount</A ></TD ></TR ><TR ><TD CLASS="doc" >Number of hard links to this file. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileOwner" ><A NAME="v%3AfileOwner" ></A ></A ><B >fileOwner</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A ></TD ></TR ><TR ><TD CLASS="doc" >ID of owner. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileGroup" ><A NAME="v%3AfileGroup" ></A ></A ><B >fileGroup</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A ></TD ></TR ><TR ><TD CLASS="doc" >ID of group. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:specialDeviceID" ><A NAME="v%3AspecialDeviceID" ></A ></A ><B >specialDeviceID</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A ></TD ></TR ><TR ><TD CLASS="doc" >Describes the device that this file represents. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fileSize" ><A NAME="v%3AfileSize" ></A ></A ><B >fileSize</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A ></TD ></TR ><TR ><TD CLASS="doc" >Size of the file in bytes. If this file is a symbolic link the size is the length of the pathname it contains. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:accessTime" ><A NAME="v%3AaccessTime" ></A ></A ><B >accessTime</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Time of last access. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:modificationTime" ><A NAME="v%3AmodificationTime" ></A ></A ><B >modificationTime</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Time of last modification. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:statusChangeTime" ><A NAME="v%3AstatusChangeTime" ></A ></A ><B >statusChangeTime</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Time of last status change (i.e. owner, group, link count, mode, etc.). </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isBlockDevice" ><A NAME="v%3AisBlockDevice" ></A ></A ><B >isBlockDevice</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a block device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isCharacterDevice" ><A NAME="v%3AisCharacterDevice" ></A ></A ><B >isCharacterDevice</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a character device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isNamedPipe" ><A NAME="v%3AisNamedPipe" ></A ></A ><B >isNamedPipe</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a named pipe device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isRegularFile" ><A NAME="v%3AisRegularFile" ></A ></A ><B >isRegularFile</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a regular file device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isDirectory" ><A NAME="v%3AisDirectory" ></A ></A ><B >isDirectory</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a directory device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isSymbolicLink" ><A NAME="v%3AisSymbolicLink" ></A ></A ><B >isSymbolicLink</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a symbolic link device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:isSocket" ><A NAME="v%3AisSocket" ></A ></A ><B >isSocket</B > :: <A HREF="System-Posix-Files.html#t%3AFileStatus" >FileStatus</A > -> <A HREF="../ghc-prim/GHC-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="doc" >Checks if this file is a socket device. </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="7" ><A NAME="7" >Creation </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:createNamedPipe" ><A NAME="v%3AcreateNamedPipe" ></A ></A ><B >createNamedPipe</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >createNamedPipe fifo mode</TT > creates a new named pipe, <TT >fifo</TT >, with permissions based on <TT >mode</TT >. May fail with <TT ><A HREF="../base/Foreign-C-Error.html#v%3AthrowErrnoPathIfMinus1_" >throwErrnoPathIfMinus1_</A ></TT > if a file named <TT >name</TT > already exists or if the effective user ID of the current process doesn't have permission to create the pipe. </P ><P >Note: calls <TT >mkfifo</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:createDevice" ><A NAME="v%3AcreateDevice" ></A ></A ><B >createDevice</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileMode" >FileMode</A > -> <A HREF="../base/System-Posix-Types.html#t%3ADeviceID" >DeviceID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >createDevice path mode dev</TT > creates either a regular or a special file depending on the value of <TT >mode</TT > (and <TT >dev</TT >). <TT >mode</TT > will normally be either <TT ><A HREF="System-Posix-Files.html#v%3AblockSpecialMode" >blockSpecialMode</A ></TT > or <TT ><A HREF="System-Posix-Files.html#v%3AcharacterSpecialMode" >characterSpecialMode</A ></TT >. May fail with <TT ><A HREF="../base/Foreign-C-Error.html#v%3AthrowErrnoPathIfMinus1_" >throwErrnoPathIfMinus1_</A ></TT > if a file named <TT >name</TT > already exists or if the effective user ID of the current process doesn't have permission to create the file. </P ><P >Note: calls <TT >mknod</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="8" ><A NAME="8" >Hard links </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:createLink" ><A NAME="v%3AcreateLink" ></A ></A ><B >createLink</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >createLink old new</TT > creates a new path, <TT >new</TT >, linked to an existing file, <TT >old</TT >. </P ><P >Note: calls <TT >link</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:removeLink" ><A NAME="v%3AremoveLink" ></A ></A ><B >removeLink</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >removeLink path</TT > removes the link named <TT >path</TT >. </P ><P >Note: calls <TT >unlink</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="9" ><A NAME="9" >Symbolic links </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:createSymbolicLink" ><A NAME="v%3AcreateSymbolicLink" ></A ></A ><B >createSymbolicLink</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >createSymbolicLink file1 file2</TT > creates a symbolic link named <TT >file2</TT > which points to the file <TT >file1</TT >. </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 <TT >symlink</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:readSymbolicLink" ><A NAME="v%3AreadSymbolicLink" ></A ></A ><B >readSymbolicLink</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Reads the <TT >FilePath</TT > pointed to by the symbolic link and returns it. </P ><P >Note: calls <TT >readlink</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="10" ><A NAME="10" >Renaming files </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:rename" ><A NAME="v%3Arename" ></A ></A ><B >rename</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >rename old new</TT > renames a file or directory from <TT >old</TT > to <TT >new</TT >. </P ><P >Note: calls <TT >rename</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="11" ><A NAME="11" >Changing file ownership </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setOwnerAndGroup" ><A NAME="v%3AsetOwnerAndGroup" ></A ></A ><B >setOwnerAndGroup</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >setOwnerAndGroup path uid gid</TT > changes the owner and group of <TT >path</TT > to <TT >uid</TT > and <TT >gid</TT >, respectively. </P ><P >If <TT >uid</TT > or <TT >gid</TT > is specified as -1, then that ID is not changed. </P ><P >Note: calls <TT >chown</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFdOwnerAndGroup" ><A NAME="v%3AsetFdOwnerAndGroup" ></A ></A ><B >setFdOwnerAndGroup</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Acts as <TT ><A HREF="System-Posix-Files.html#v%3AsetOwnerAndGroup" >setOwnerAndGroup</A ></TT > but uses a file descriptor instead of a <TT ><A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TT >. </P ><P >Note: calls <TT >fchown</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setSymbolicLinkOwnerAndGroup" ><A NAME="v%3AsetSymbolicLinkOwnerAndGroup" ></A ></A ><B >setSymbolicLinkOwnerAndGroup</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AUserID" >UserID</A > -> <A HREF="../base/System-Posix-Types.html#t%3AGroupID" >GroupID</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Acts as <TT ><A HREF="System-Posix-Files.html#v%3AsetOwnerAndGroup" >setOwnerAndGroup</A ></TT > but does not follow symlinks (and thus changes permissions on the link itself). </P ><P >Note: calls <TT >lchown</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="12" ><A NAME="12" >Changing file timestamps </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFileTimes" ><A NAME="v%3AsetFileTimes" ></A ></A ><B >setFileTimes</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A > -> <A HREF="../base/System-Posix-Types.html#t%3AEpochTime" >EpochTime</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >setFileTimes path atime mtime</TT > sets the access and modification times associated with file <TT >path</TT > to <TT >atime</TT > and <TT >mtime</TT >, respectively. </P ><P >Note: calls <TT >utime</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:touchFile" ><A NAME="v%3AtouchFile" ></A ></A ><B >touchFile</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >touchFile path</TT > sets the access and modification times associated with file <TT >path</TT > to the current time. </P ><P >Note: calls <TT >utime</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="13" ><A NAME="13" >Setting file sizes </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFileSize" ><A NAME="v%3AsetFileSize" ></A ></A ><B >setFileSize</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD 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 <TT >truncate</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:setFdSize" ><A NAME="v%3AsetFdSize" ></A ></A ><B >setFdSize</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="../base/System-Posix-Types.html#t%3AFileOffset" >FileOffset</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../ghc-prim/GHC-Unit.html#t%3A%28%29" >()</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Acts as <TT ><A HREF="System-Posix-Files.html#v%3AsetFileSize" >setFileSize</A ></TT > but uses a file descriptor instead of a <TT ><A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A ></TT >. </P ><P >Note: calls <TT >ftruncate</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" ><A NAME="14" ><A NAME="14" >Find system-specific limits for a file </A ></A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:PathVar" ><A NAME="t%3APathVar" ></A ></A ><B >PathVar</B > </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:FileSizeBits" ><A NAME="v%3AFileSizeBits" ></A ></A ><B >FileSizeBits</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:LinkLimit" ><A NAME="v%3ALinkLimit" ></A ></A ><B >LinkLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:InputLineLimit" ><A NAME="v%3AInputLineLimit" ></A ></A ><B >InputLineLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:InputQueueLimit" ><A NAME="v%3AInputQueueLimit" ></A ></A ><B >InputQueueLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:FileNameLimit" ><A NAME="v%3AFileNameLimit" ></A ></A ><B >FileNameLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:PathNameLimit" ><A NAME="v%3APathNameLimit" ></A ></A ><B >PathNameLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:PipeBufferLimit" ><A NAME="v%3APipeBufferLimit" ></A ></A ><B >PipeBufferLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:SymbolicLinkLimit" ><A NAME="v%3ASymbolicLinkLimit" ></A ></A ><B >SymbolicLinkLimit</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:SetOwnerAndGroupIsRestricted" ><A NAME="v%3ASetOwnerAndGroupIsRestricted" ></A ></A ><B >SetOwnerAndGroupIsRestricted</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:FileNamesAreNotTruncated" ><A NAME="v%3AFileNamesAreNotTruncated" ></A ></A ><B >FileNamesAreNotTruncated</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:VDisableChar" ><A NAME="v%3AVDisableChar" ></A ></A ><B >VDisableChar</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:AsyncIOAvailable" ><A NAME="v%3AAsyncIOAvailable" ></A ></A ><B >AsyncIOAvailable</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:PrioIOAvailable" ><A NAME="v%3APrioIOAvailable" ></A ></A ><B >PrioIOAvailable</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:SyncIOAvailable" ><A NAME="v%3ASyncIOAvailable" ></A ></A ><B >SyncIOAvailable</B ></TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getPathVar" ><A NAME="v%3AgetPathVar" ></A ></A ><B >getPathVar</B > :: <A HREF="../base/System-IO.html#t%3AFilePath" >FilePath</A > -> <A HREF="System-Posix-Files.html#t%3APathVar" >PathVar</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3ALimit" >Limit</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >getPathVar var path</TT > obtains the dynamic value of the requested configurable file limit or option associated with file or directory <TT >path</TT >. For defined file limits, <TT >getPathVar</TT > returns the associated value. For defined file options, the result of <TT >getPathVar</TT > is undefined, but not failure. </P ><P >Note: calls <TT >pathconf</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getFdPathVar" ><A NAME="v%3AgetFdPathVar" ></A ></A ><B >getFdPathVar</B > :: <A HREF="../base/System-Posix-Types.html#t%3AFd" >Fd</A > -> <A HREF="System-Posix-Files.html#t%3APathVar" >PathVar</A > -> <A HREF="../base/System-IO.html#t%3AIO" >IO</A > <A HREF="../base/System-Posix-Types.html#t%3ALimit" >Limit</A ></TD ></TR ><TR ><TD CLASS="doc" ><P ><TT >getFdPathVar var fd</TT > obtains the dynamic value of the requested configurable file limit or option associated with the file or directory attached to the open channel <TT >fd</TT >. For defined file limits, <TT >getFdPathVar</TT > returns the associated value. For defined file options, the result of <TT >getFdPathVar</TT > is undefined, but not failure. </P ><P >Note: calls <TT >fpathconf</TT >. </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.4.2</TD ></TR ></TABLE ></BODY ></HTML >