hsfm/HSFM-FileSystem-FileType.html
2016-06-01 19:32:51 +02:00

34 lines
53 KiB
HTML

<!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>HSFM.FileSystem.FileType</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_HSFM-FileSystem-FileType.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-FileSystem-FileType.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">hsfm-gtk</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.FileSystem.FileType</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides a data type for representing directories/files
in a well-typed and convenient way. This is useful to gather and
save information about a file, so the information can be easily
processed in e.g. a GUI.</p><p>However, it's not meant to be used to interact with low-level
functions that copy files etc, since there's no guarantee that
the in-memory representation of the type still matches what is
happening on filesystem level.</p><p>If you interact with low-level libraries, you must not pattern
match on the `File a` type. Instead, you should only use the saved
<code><a href="HSFM-FileSystem-FileType.html#v:path">path</a></code> and make no assumptions about the file the path might or
might not point to.</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"><span class="keyword">data</span> <a href="#t:File">File</a> a<ul class="subs"><li>= <a href="#v:Failed">Failed</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:err">err</a> :: IOError</li></ul> }</li><li>| <a href="#v:Dir">Dir</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li><li>| <a href="#v:RegFile">RegFile</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li><li>| <a href="#v:SymLink">SymLink</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li><li><a href="#v:sdest">sdest</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a</li><li><a href="#v:rawdest">rawdest</a> :: !<a href="https://hackage.haskell.org/package/utf8-string-0.3.7/docs/Data-ByteString-UTF8.html#t:ByteString">ByteString</a></li></ul> }</li><li>| <a href="#v:BlockDev">BlockDev</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li><li>| <a href="#v:CharDev">CharDev</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li><li>| <a href="#v:NamedPipe">NamedPipe</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li><li>| <a href="#v:Socket">Socket</a> { <ul class="subs"><li><a href="#v:path">path</a> :: !(Path Abs)</li><li><a href="#v:fvar">fvar</a> :: a</li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:FileInfo">FileInfo</a> = <a href="#v:FileInfo">FileInfo</a> {<ul class="subs"><li><a href="#v:deviceID">deviceID</a> :: !DeviceID</li><li><a href="#v:fileID">fileID</a> :: !FileID</li><li><a href="#v:fileMode">fileMode</a> :: !FileMode</li><li><a href="#v:linkCount">linkCount</a> :: !LinkCount</li><li><a href="#v:fileOwner">fileOwner</a> :: !UserID</li><li><a href="#v:fileGroup">fileGroup</a> :: !GroupID</li><li><a href="#v:specialDeviceID">specialDeviceID</a> :: !DeviceID</li><li><a href="#v:fileSize">fileSize</a> :: !FileOffset</li><li><a href="#v:accessTime">accessTime</a> :: !EpochTime</li><li><a href="#v:modificationTime">modificationTime</a> :: !EpochTime</li><li><a href="#v:statusChangeTime">statusChangeTime</a> :: !EpochTime</li><li><a href="#v:accessTimeHiRes">accessTimeHiRes</a> :: !POSIXTime</li><li><a href="#v:modificationTimeHiRes">modificationTimeHiRes</a> :: !POSIXTime</li><li><a href="#v:statusChangeTimeHiRes">statusChangeTimeHiRes</a> :: !POSIXTime</li></ul>}</li><li class="src short"><a href="#v:sfileLike">sfileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:fileLike">fileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:sdir">sdir</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><span class="keyword">pattern</span> <a href="#v:FileLike">FileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:DirList">DirList</a> :: <span class="keyword">forall</span> t. (Foldable t, Functor t) =&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) -&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><span class="keyword">pattern</span> <a href="#v:FileLikeList">FileLikeList</a> :: <span class="keyword">forall</span> t. (Foldable t, Functor t) =&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) -&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:brokenSymlink">brokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:fileLikeSym">fileLikeSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:dirSym">dirSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><span class="keyword">pattern</span> <a href="#v:FileLikeSym">FileLikeSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:BrokenSymlink">BrokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:DirOrSym">DirOrSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:DirSym">DirSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><span class="keyword">pattern</span> <a href="#v:FileLikeOrSym">FileLikeOrSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><a href="#v:readFile">readFile</a> :: (Path Abs -&gt; IO a) -&gt; Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a)</li><li class="src short"><a href="#v:readDirectoryContents">readDirectoryContents</a> :: (Path Abs -&gt; IO a) -&gt; Path Abs -&gt; IO [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a]</li><li class="src short"><a href="#v:getContents">getContents</a> :: (Path Abs -&gt; IO a) -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; IO [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a]</li><li class="src short"><a href="#v:goUp">goUp</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:goUp-39-">goUp'</a> :: Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</li><li class="src short"><a href="#v:anyFailed">anyFailed</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; Bool</li><li class="src short"><a href="#v:successful">successful</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; Bool</li><li class="src short"><a href="#v:failed">failed</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:failures">failures</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a]</li><li class="src short"><a href="#v:comparingConstr">comparingConstr</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Ordering</li><li class="src short"><a href="#v:isFileC">isFileC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isDirC">isDirC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isSymC">isSymC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isBlockC">isBlockC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isCharC">isCharC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isNamedC">isNamedC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:isSocketC">isSocketC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</li><li class="src short"><a href="#v:getFileInfo">getFileInfo</a> :: Path Abs -&gt; IO <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></li><li class="src short"><a href="#v:handleDT">handleDT</a> :: Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a) -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a)</li><li class="src short"><a href="#v:isBrokenSymlink">isBrokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</li><li class="src short"><a href="#v:packModTime">packModTime</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String</li><li class="src short"><a href="#v:packAccessTime">packAccessTime</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String</li><li class="src short"><a href="#v:epochToString">epochToString</a> :: EpochTime -&gt; String</li><li class="src short"><a href="#v:packPermissions">packPermissions</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String</li><li class="src short"><a href="#v:packFileType">packFileType</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; String</li><li class="src short"><a href="#v:packLinkDestination">packLinkDestination</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Maybe <a href="https://hackage.haskell.org/package/utf8-string-0.3.7/docs/Data-ByteString-UTF8.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:fromFreeVar">fromFreeVar</a> :: Default d =&gt; (a -&gt; d) -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; d</li><li class="src short"><a href="#v:getFPasStr">getFPasStr</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; String</li><li class="src short"><a href="#v:getFreeVar">getFreeVar</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Maybe a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:File" class="def">File</a> a <a href="src/HSFM-FileSystem-FileType.html#File" class="link">Source</a> <a href="#t:File" class="selflink">#</a></p><div class="doc"><p>The String in the path field is always a full path.
The free type variable is used in the File/Dir constructor and can hold
Handles, Strings representing a file's contents or anything else you can
think of. We catch any IO errors in the Failed constructor.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Failed" class="def">Failed</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:err" class="def">err</a> :: IOError</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:Dir" class="def">Dir</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:RegFile" class="def">RegFile</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:SymLink" class="def">SymLink</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:sdest" class="def">sdest</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a</dfn><div class="doc"><p>symlink madness,
we need to know where it points to</p></div></li><li><dfn class="src"><a id="v:rawdest" class="def">rawdest</a> :: !<a href="https://hackage.haskell.org/package/utf8-string-0.3.7/docs/Data-ByteString-UTF8.html#t:ByteString">ByteString</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:BlockDev" class="def">BlockDev</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:CharDev" class="def">CharDev</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:NamedPipe" class="def">NamedPipe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:Socket" class="def">Socket</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:path" class="def">path</a> :: !(Path Abs)</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:File" class="caption collapser" onclick="toggleSection('i:File')">Instances</p><div id="section.i:File" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:File:Eq:1" class="instance expander" onclick="toggleSection('i:id:File:Eq:1')"></span> Eq a =&gt; Eq (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a)</span> <a href="src/HSFM-FileSystem-FileType.html#line-137" class="link">Source</a> <a href="#t:File" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:File:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:File:Ord:2" class="instance expander" onclick="toggleSection('i:id:File:Ord:2')"></span> Ord (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</span> <a href="src/HSFM-FileSystem-FileType.html#line-282" class="link">Source</a> <a href="#t:File" class="selflink">#</a></td><td class="doc"><p>First compare constructors: Failed &lt; Dir &lt; File...
Then compare <code>name</code>...
Then compare free variable parameter of <code><a href="HSFM-FileSystem-FileType.html#t:File">File</a></code> constructors</p></td></tr><tr><td colspan="2"><div id="section.i:id:File:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p><p class="src"><a href="#v:min">min</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:File:Show:3" class="instance expander" onclick="toggleSection('i:id:File:Show:3')"></span> Show a =&gt; Show (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a)</span> <a href="src/HSFM-FileSystem-FileType.html#line-137" class="link">Source</a> <a href="#t:File" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:File:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; ShowS</p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:FileInfo" class="def">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#FileInfo" class="link">Source</a> <a href="#t:FileInfo" class="selflink">#</a></p><div class="doc"><p>Low-level file information.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:FileInfo" class="def">FileInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:deviceID" class="def">deviceID</a> :: !DeviceID</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fileID" class="def">fileID</a> :: !FileID</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fileMode" class="def">fileMode</a> :: !FileMode</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:linkCount" class="def">linkCount</a> :: !LinkCount</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fileOwner" class="def">fileOwner</a> :: !UserID</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fileGroup" class="def">fileGroup</a> :: !GroupID</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:specialDeviceID" class="def">specialDeviceID</a> :: !DeviceID</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:fileSize" class="def">fileSize</a> :: !FileOffset</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:accessTime" class="def">accessTime</a> :: !EpochTime</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:modificationTime" class="def">modificationTime</a> :: !EpochTime</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:statusChangeTime" class="def">statusChangeTime</a> :: !EpochTime</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:accessTimeHiRes" class="def">accessTimeHiRes</a> :: !POSIXTime</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:modificationTimeHiRes" class="def">modificationTimeHiRes</a> :: !POSIXTime</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:statusChangeTimeHiRes" class="def">statusChangeTimeHiRes</a> :: !POSIXTime</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:FileInfo" class="caption collapser" onclick="toggleSection('i:FileInfo')">Instances</p><div id="section.i:FileInfo" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:FileInfo:Eq:1" class="instance expander" onclick="toggleSection('i:id:FileInfo:Eq:1')"></span> Eq <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></span> <a href="src/HSFM-FileSystem-FileType.html#line-156" class="link">Source</a> <a href="#t:FileInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:FileInfo:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:FileInfo:Ord:2" class="instance expander" onclick="toggleSection('i:id:FileInfo:Ord:2')"></span> Ord <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></span> <a href="src/HSFM-FileSystem-FileType.html#line-156" class="link">Source</a> <a href="#t:FileInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:FileInfo:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p><p class="src"><a href="#v:min">min</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:FileInfo:Show:3" class="instance expander" onclick="toggleSection('i:id:FileInfo:Show:3')"></span> Show <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></span> <a href="src/HSFM-FileSystem-FileType.html#line-156" class="link">Source</a> <a href="#t:FileInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:FileInfo:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -&gt; <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>] -&gt; ShowS</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:FileInfo:Ord:4" class="instance expander" onclick="toggleSection('i:id:FileInfo:Ord:4')"></span> Ord (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>)</span> <a href="src/HSFM-FileSystem-FileType.html#line-282" class="link">Source</a> <a href="#t:FileInfo" class="selflink">#</a></td><td class="doc"><p>First compare constructors: Failed &lt; Dir &lt; File...
Then compare <code>name</code>...
Then compare free variable parameter of <code><a href="HSFM-FileSystem-FileType.html#t:File">File</a></code> constructors</p></td></tr><tr><td colspan="2"><div id="section.i:id:FileInfo:Ord:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Ordering</p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool</p><p class="src"><a href="#v:max">max</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p><p class="src"><a href="#v:min">min</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:sfileLike" class="def">sfileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#sfileLike" class="link">Source</a> <a href="#v:sfileLike" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:fileLike" class="def">fileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#fileLike" class="link">Source</a> <a href="#v:fileLike" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:sdir" class="def">sdir</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#sdir" class="link">Source</a> <a href="#v:sdir" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:FileLike" class="def">FileLike</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#FileLike" class="link">Source</a> <a href="#v:FileLike" class="selflink">#</a></p><div class="doc"><p>Matches on any non-directory kind of files, excluding symlinks.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:DirList" class="def">DirList</a> :: <span class="keyword">forall</span> t. (Foldable t, Functor t) =&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) -&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#DirList" class="link">Source</a> <a href="#v:DirList" class="selflink">#</a></p><div class="doc"><p>Matches a list of directories or symlinks pointing to directories.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:FileLikeList" class="def">FileLikeList</a> :: <span class="keyword">forall</span> t. (Foldable t, Functor t) =&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) -&gt; t (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#FileLikeList" class="link">Source</a> <a href="#v:FileLikeList" class="selflink">#</a></p><div class="doc"><p>Matches a list of any non-directory kind of files or symlinks
pointing to such.</p></div></div><div class="top"><p class="src"><a id="v:brokenSymlink" class="def">brokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#brokenSymlink" class="link">Source</a> <a href="#v:brokenSymlink" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:fileLikeSym" class="def">fileLikeSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#fileLikeSym" class="link">Source</a> <a href="#v:fileLikeSym" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:dirSym" class="def">dirSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; (Bool, <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#dirSym" class="link">Source</a> <a href="#v:dirSym" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:FileLikeSym" class="def">FileLikeSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#FileLikeSym" class="link">Source</a> <a href="#v:FileLikeSym" class="selflink">#</a></p><div class="doc"><p>Matches on symlinks pointing to file-like files only.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:BrokenSymlink" class="def">BrokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#BrokenSymlink" class="link">Source</a> <a href="#v:BrokenSymlink" class="selflink">#</a></p><div class="doc"><p>Matches on broken symbolic links.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:DirOrSym" class="def">DirOrSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#DirOrSym" class="link">Source</a> <a href="#v:DirOrSym" class="selflink">#</a></p><div class="doc"><p>Matches on directories or symlinks pointing to directories.
If the symlink is pointing to a symlink pointing to a directory, then
it will return True, but also return the first element in the symlink-
chain, not the last.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:DirSym" class="def">DirSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#DirSym" class="link">Source</a> <a href="#v:DirSym" class="selflink">#</a></p><div class="doc"><p>Matches on symlinks pointing to directories only.</p></div></div><div class="top"><p class="src"><span class="keyword">pattern</span> <a id="v:FileLikeOrSym" class="def">FileLikeOrSym</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#FileLikeOrSym" class="link">Source</a> <a href="#v:FileLikeOrSym" class="selflink">#</a></p><div class="doc"><p>Matches on any non-directory kind of files or symlinks pointing to
such.
If the symlink is pointing to a symlink pointing to such a file, then
it will return True, but also return the first element in the symlink-
chain, not the last.</p></div></div><div class="top"><p class="src"><a id="v:readFile" class="def">readFile</a> :: (Path Abs -&gt; IO a) -&gt; Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a) <a href="src/HSFM-FileSystem-FileType.html#readFile" class="link">Source</a> <a href="#v:readFile" class="selflink">#</a></p><div class="doc"><p>Reads a file or directory Path into an <code>AnchoredFile</code>, filling the free
variables via the given function.</p></div></div><div class="top"><p class="src"><a id="v:readDirectoryContents" class="def">readDirectoryContents</a> <a href="src/HSFM-FileSystem-FileType.html#readDirectoryContents" class="link">Source</a> <a href="#v:readDirectoryContents" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (Path Abs -&gt; IO a)</td><td class="doc"><p>fills free a variable</p></td></tr><tr><td class="src">-&gt; Path Abs</td><td class="doc"><p>path to read</p></td></tr><tr><td class="src">-&gt; IO [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Get the contents of a given directory and return them as a list
of <code>AnchoredFile</code>.</p></div></div><div class="top"><p class="src"><a id="v:getContents" class="def">getContents</a> :: (Path Abs -&gt; IO a) -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; IO [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] <a href="src/HSFM-FileSystem-FileType.html#getContents" class="link">Source</a> <a href="#v:getContents" class="selflink">#</a></p><div class="doc"><p>A variant of <code><a href="HSFM-FileSystem-FileType.html#v:readDirectoryContents">readDirectoryContents</a></code> where the second argument
is a <code><a href="HSFM-FileSystem-FileType.html#t:File">File</a></code>. If a non-directory is passed returns an empty list.</p></div></div><div class="top"><p class="src"><a id="v:goUp" class="def">goUp</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#goUp" class="link">Source</a> <a href="#v:goUp" class="selflink">#</a></p><div class="doc"><p>Go up one directory in the filesystem hierarchy.</p></div></div><div class="top"><p class="src"><a id="v:goUp-39-" class="def">goUp'</a> :: Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a>) <a href="src/HSFM-FileSystem-FileType.html#goUp%27" class="link">Source</a> <a href="#v:goUp-39-" class="selflink">#</a></p><div class="doc"><p>Go up one directory in the filesystem hierarchy.</p></div></div><div class="top"><p class="src"><a id="v:anyFailed" class="def">anyFailed</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#anyFailed" class="link">Source</a> <a href="#v:anyFailed" class="selflink">#</a></p><div class="doc"><p>True if any Failed constructors in the tree.</p></div></div><div class="top"><p class="src"><a id="v:successful" class="def">successful</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#successful" class="link">Source</a> <a href="#v:successful" class="selflink">#</a></p><div class="doc"><p>True if there are no Failed constructors in the tree.</p></div></div><div class="top"><p class="src"><a id="v:failed" class="def">failed</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#failed" class="link">Source</a> <a href="#v:failed" class="selflink">#</a></p><div class="doc"><p>Returns true if argument is a <code><a href="HSFM-FileSystem-FileType.html#v:Failed">Failed</a></code> constructor.</p></div></div><div class="top"><p class="src"><a id="v:failures" class="def">failures</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -&gt; [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] <a href="src/HSFM-FileSystem-FileType.html#failures" class="link">Source</a> <a href="#v:failures" class="selflink">#</a></p><div class="doc"><p>Returns a list of <code><a href="HSFM-FileSystem-FileType.html#v:Failed">Failed</a></code> constructors only.</p></div></div><div class="top"><p class="src"><a id="v:comparingConstr" class="def">comparingConstr</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Ordering <a href="src/HSFM-FileSystem-FileType.html#comparingConstr" class="link">Source</a> <a href="#v:comparingConstr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isFileC" class="def">isFileC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isFileC" class="link">Source</a> <a href="#v:isFileC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isDirC" class="def">isDirC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isDirC" class="link">Source</a> <a href="#v:isDirC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isSymC" class="def">isSymC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isSymC" class="link">Source</a> <a href="#v:isSymC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isBlockC" class="def">isBlockC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isBlockC" class="link">Source</a> <a href="#v:isBlockC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isCharC" class="def">isCharC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isCharC" class="link">Source</a> <a href="#v:isCharC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isNamedC" class="def">isNamedC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isNamedC" class="link">Source</a> <a href="#v:isNamedC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isSocketC" class="def">isSocketC</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isSocketC" class="link">Source</a> <a href="#v:isSocketC" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getFileInfo" class="def">getFileInfo</a> :: Path Abs -&gt; IO <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> <a href="src/HSFM-FileSystem-FileType.html#getFileInfo" class="link">Source</a> <a href="#v:getFileInfo" class="selflink">#</a></p><div class="doc"><p>Gets all file information.</p></div></div><div class="top"><p class="src"><a id="v:handleDT" class="def">handleDT</a> :: Path Abs -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a) -&gt; IO (<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a) <a href="src/HSFM-FileSystem-FileType.html#handleDT" class="link">Source</a> <a href="#v:handleDT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:isBrokenSymlink" class="def">isBrokenSymlink</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; Bool <a href="src/HSFM-FileSystem-FileType.html#isBrokenSymlink" class="link">Source</a> <a href="#v:isBrokenSymlink" class="selflink">#</a></p><div class="doc"><p>Checks if a symlink is broken by examining the constructor of the
symlink destination.</p><p>When called on a non-symlink, returns False.</p></div></div><div class="top"><p class="src"><a id="v:packModTime" class="def">packModTime</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String <a href="src/HSFM-FileSystem-FileType.html#packModTime" class="link">Source</a> <a href="#v:packModTime" class="selflink">#</a></p><div class="doc"><p>Pack the modification time into a string.</p></div></div><div class="top"><p class="src"><a id="v:packAccessTime" class="def">packAccessTime</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String <a href="src/HSFM-FileSystem-FileType.html#packAccessTime" class="link">Source</a> <a href="#v:packAccessTime" class="selflink">#</a></p><div class="doc"><p>Pack the modification time into a string.</p></div></div><div class="top"><p class="src"><a id="v:epochToString" class="def">epochToString</a> :: EpochTime -&gt; String <a href="src/HSFM-FileSystem-FileType.html#epochToString" class="link">Source</a> <a href="#v:epochToString" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:packPermissions" class="def">packPermissions</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -&gt; String <a href="src/HSFM-FileSystem-FileType.html#packPermissions" class="link">Source</a> <a href="#v:packPermissions" class="selflink">#</a></p><div class="doc"><p>Pack the permissions into a string, similar to what &quot;ls -l&quot; does.</p></div></div><div class="top"><p class="src"><a id="v:packFileType" class="def">packFileType</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; String <a href="src/HSFM-FileSystem-FileType.html#packFileType" class="link">Source</a> <a href="#v:packFileType" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:packLinkDestination" class="def">packLinkDestination</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Maybe <a href="https://hackage.haskell.org/package/utf8-string-0.3.7/docs/Data-ByteString-UTF8.html#t:ByteString">ByteString</a> <a href="src/HSFM-FileSystem-FileType.html#packLinkDestination" class="link">Source</a> <a href="#v:packLinkDestination" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:fromFreeVar" class="def">fromFreeVar</a> :: Default d =&gt; (a -&gt; d) -&gt; <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; d <a href="src/HSFM-FileSystem-FileType.html#fromFreeVar" class="link">Source</a> <a href="#v:fromFreeVar" class="selflink">#</a></p><div class="doc"><p>Apply a function on the free variable. If there is no free variable
for the given constructor the value from the <code>Default</code> class is used.</p></div></div><div class="top"><p class="src"><a id="v:getFPasStr" class="def">getFPasStr</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; String <a href="src/HSFM-FileSystem-FileType.html#getFPasStr" class="link">Source</a> <a href="#v:getFPasStr" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getFreeVar" class="def">getFreeVar</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -&gt; Maybe a <a href="src/HSFM-FileSystem-FileType.html#getFreeVar" class="link">Source</a> <a href="#v:getFreeVar" class="selflink">#</a></p><div class="doc"><p>Gets the free variable. Returns Nothing if the constructor is of <code><a href="HSFM-FileSystem-FileType.html#v:Failed">Failed</a></code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>