34 lines
53 KiB
HTML
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> -> (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> -> (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> -> (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> ->
|
||
|
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"> </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"> </div></li><li><dfn class="src"><a id="v:err" class="def">err</a> :: IOError</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:Dir" class="def">Dir</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:RegFile" class="def">RegFile</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:SymLink" class="def">SymLink</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </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"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:BlockDev" class="def">BlockDev</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:CharDev" class="def">CharDev</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:NamedPipe" class="def">NamedPipe</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </div></li></ul></div></td></tr><tr><td class="src"><a id="v:Socket" class="def">Socket</a></td><td class="doc empty"> </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"> </div></li><li><dfn class="src"><a id="v:fvar" class="def">fvar</a> :: a</dfn><div class="doc empty"> </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 => 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"> </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 -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> 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 < Dir < 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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Ordering</p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> 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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <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 => 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"> </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 -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> String</p><p class="src"><a href="#v:showList">showList</a> :: [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a] -> 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></
|
||
|
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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Ordering</p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> Bool</p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> 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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> <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> -> (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> -> (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> -> (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><d
|
||
|
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> -> (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> -> (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> -> (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> -> <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> -> <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> -> <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> -> <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> -> <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 -> IO a) -> Path Abs -> 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 -> IO a)</td><td class="doc"><p>fills free a variable</p></td></tr><tr><td class="src">-> Path Abs</td><td class="doc"><p>path to read</p></td></tr><tr><td class="src">-> IO [<a href="HSFM-FileSystem-FileType.html#t:File">File</a> a]</td><td class="doc empty"> </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 -> IO a) -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> 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> -> 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 -> 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] -> 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] -> 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 -> 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] -> [<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> -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> <a href="HSFM-FileSystem-FileType.html#t:FileInfo">FileInfo</a> -> 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 -> 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 -> 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 -> 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">isBl
|
||
|
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> -> 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> -> 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 -> 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> -> 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 "ls -l" 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 -> 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 -> 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 => (a -> d) -> <a href="HSFM-FileSystem-FileType.html#t:File">File</a> a -> 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 -> 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 -> 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>
|