This file is indexed.

/usr/share/doc/libghc-system-fileio-doc/html/Filesystem.html is in libghc-system-fileio-doc 0.3.16.3-3build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!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>Filesystem</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Filesystem.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Filesystem.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">system-fileio-0.3.16.3: Consistent filesystem interaction across GHC versions (deprecated)</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>2011-2012 John Millikin &lt;jmillikin@gmail.com&gt;</td></tr><tr><th>License</th><td>MIT</td></tr><tr><th>Maintainer</th><td>John Millikin &lt;jmillikin@gmail.com&gt;</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Filesystem</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Exports from System.IO</a></li><li><a href="#g:2">Files</a><ul><li><a href="#g:3">Binary files</a></li><li><a href="#g:4">Text files</a></li></ul></li><li><a href="#g:5">Directories</a><ul><li><a href="#g:6">Creating directories</a></li><li><a href="#g:7">Removing directories</a></li><li><a href="#g:8">Current working directory</a></li><li><a href="#g:9">Commonly used paths</a></li></ul></li><li><a href="#g:10">Other</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Simple <code><a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></code>&#8208;aware wrappers around standard <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html">System.IO</a>
 computations. These wrappers are designed to work as similarly as
 possible across various versions of GHC.</p><p>In particular, they do not require POSIX file paths to be valid strings,
 and can therefore open paths regardless of the current locale encoding.</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:Handle">Handle</a> :: *</li><li class="src short"><span class="keyword">data</span> <a href="#t:IOMode">IOMode</a> :: *<ul class="subs"><li>= <a href="#v:ReadMode">ReadMode</a></li><li>| <a href="#v:WriteMode">WriteMode</a></li><li>| <a href="#v:AppendMode">AppendMode</a></li><li>| <a href="#v:ReadWriteMode">ReadWriteMode</a></li></ul></li><li class="src short"><a href="#v:isFile">isFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:getModified">getModified</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a></li><li class="src short"><a href="#v:getSize">getSize</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:copyFile">copyFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:copyFileContent">copyFileContent</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:copyPermissions">copyPermissions</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:removeFile">removeFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:openFile">openFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Filesystem.html#t:Handle">Handle</a></li><li class="src short"><a href="#v:withFile">withFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; (<a href="Filesystem.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:readFile">readFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:writeFile">writeFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:appendFile">appendFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:openTextFile">openTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Filesystem.html#t:Handle">Handle</a></li><li class="src short"><a href="#v:withTextFile">withTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; (<a href="Filesystem.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:readTextFile">readTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:writeTextFile">writeTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:appendTextFile">appendTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:isDirectory">isDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:canonicalizePath">canonicalizePath</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:listDirectory">listDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:createDirectory">createDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createTree">createTree</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:removeDirectory">removeDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:removeTree">removeTree</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:getWorkingDirectory">getWorkingDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:setWorkingDirectory">setWorkingDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:getHomeDirectory">getHomeDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:getDesktopDirectory">getDesktopDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:getDocumentsDirectory">getDocumentsDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:getAppDataDirectory">getAppDataDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:getAppCacheDirectory">getAppCacheDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:getAppConfigDirectory">getAppConfigDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:rename">rename</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1 id="g:1">Exports from System.IO</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Handle" class="def">Handle</a> :: *</p><div class="doc"><p>Haskell defines operations to read and write characters from and to files,
 represented by values of type <code>Handle</code>.  Each value of this type is a
 <em>handle</em>: a record used by the Haskell run-time system to <em>manage</em> I/O
 with file system objects.  A handle has at least the following properties:</p><ul><li>whether it manages input or output or both;</li><li>whether it is <em>open</em>, <em>closed</em> or <em>semi-closed</em>;</li><li>whether the object is seekable;</li><li>whether buffering is disabled, or enabled on a line or block basis;</li><li>a buffer (whose length may be zero).</li></ul><p>Most handles will also have a current I/O position indicating where the next
 input or output operation will occur.  A handle is <em>readable</em> if it
 manages only input or both input and output; likewise, it is <em>writable</em> if
 it manages only output or both input and output.  A handle is <em>open</em> when
 first allocated.
 Once it is closed it can no longer be used for either input or output,
 though an implementation cannot re-use its storage while references
 remain to it.  Handles are in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a></code> classes.  The string
 produced by showing a handle is system dependent; it should include
 enough information to identify the handle for debugging.  A handle is
 equal according to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#v:-61--61-">==</a></code> only to itself; no attempt
 is made to compare the internal state of different handles for equality.</p></div><div class="subs instances"><p id="control.i:Handle" class="caption collapser" onclick="toggleSection('i:Handle')">Instances</p><div id="section.i:Handle" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Filesystem.html#t:Handle">Handle</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Filesystem.html#t:Handle">Handle</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:IOMode" class="def">IOMode</a> :: *</p><div class="doc"><p>See <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#v:openFile">openFile</a></code></p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ReadMode" class="def">ReadMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:WriteMode" class="def">WriteMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:AppendMode" class="def">AppendMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:ReadWriteMode" class="def">ReadWriteMode</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:IOMode" class="caption collapser" onclick="toggleSection('i:IOMode')">Instances</p><div id="section.i:IOMode" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ix.html#t:Ix">Ix</a> <a href="Filesystem.html#t:IOMode">IOMode</a></span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Files</h1><div class="top"><p class="src"><a name="v:isFile" class="def">isFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Filesystem.html#isFile" class="link">Source</a></p><div class="doc"><p>Check if a file exists at the given path.</p><p>Any non&#8208;directory object, including devices and pipes, are
 considered to be files. Symbolic links are resolved to their targets
 before checking their type.</p><p>This computation does not throw exceptions.</p></div></div><div class="top"><p class="src"><a name="v:getModified" class="def">getModified</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> <a href="src/Filesystem.html#getModified" class="link">Source</a></p><div class="doc"><p>Get when the object at a given path was last modified.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.2</p></div></div><div class="top"><p class="src"><a name="v:getSize" class="def">getSize</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="src/Filesystem.html#getSize" class="link">Source</a></p><div class="doc"><p>Get the size of an object at a given path. For special objects like
 links or directories, the size is filesystem&#8208; and
 platform&#8208;dependent.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.2</p></div></div><div class="top"><p class="src"><a name="v:copyFile" class="def">copyFile</a> <a href="src/Filesystem.html#copyFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>Old location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>New location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Copy the content and permissions of a file to a new entry in the
 filesystem. If a file already exists at the new location, it will be
 replaced. Copying a file is not atomic.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.1.1</p></div></div><div class="top"><p class="src"><a name="v:copyFileContent" class="def">copyFileContent</a> <a href="src/Filesystem.html#copyFileContent" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>Old location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>New location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Copy the content of a file to a new entry in the filesystem. If a
 file already exists at the new location, it will be replaced. Copying
 a file is not atomic.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.2.4 / 0.3.4</p></div></div><div class="top"><p class="src"><a name="v:copyPermissions" class="def">copyPermissions</a> <a href="src/Filesystem.html#copyPermissions" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>Old location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc"><p>New location</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Copy the permissions from one path to another. Both paths must already
 exist.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.2.4 / 0.3.4</p></div></div><div class="top"><p class="src"><a name="v:removeFile" class="def">removeFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#removeFile" class="link">Source</a></p><div class="doc"><p>Remove a file. This will fail if the file does not exist.</p><p>This computation cannot remove directories. For that, use <code><a href="Filesystem.html#v:removeDirectory">removeDirectory</a></code>
 or <code><a href="Filesystem.html#v:removeTree">removeTree</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:3">Binary files</h2><div class="top"><p class="src"><a name="v:openFile" class="def">openFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Filesystem.html#t:Handle">Handle</a> <a href="src/Filesystem.html#openFile" class="link">Source</a></p><div class="doc"><p>Open a file in binary mode, and return an open <code>Handle</code>. The <code>Handle</code>
 should be closed with <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-IO-Handle.html#v:hClose">hClose</a></code> when it is no longer needed.</p><p><code><a href="Filesystem.html#v:withFile">withFile</a></code> is easier to use, because it will handle the <code>Handle</code>&#8217;s
 lifetime automatically.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:withFile" class="def">withFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; (<a href="Filesystem.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a <a href="src/Filesystem.html#withFile" class="link">Source</a></p><div class="doc"><p>Open a file in binary mode, and pass its <code>Handle</code> to a provided
 computation. The <code>Handle</code> will be automatically closed when the
 computation returns.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:readFile" class="def">readFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Filesystem.html#readFile" class="link">Source</a></p><div class="doc"><p>Read in the entire content of a binary file.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:writeFile" class="def">writeFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#writeFile" class="link">Source</a></p><div class="doc"><p>Replace the entire content of a binary file with the provided
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:appendFile" class="def">appendFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#appendFile" class="link">Source</a></p><div class="doc"><p>Append a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code> to a file. If the file does not exist, it will
 be created.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:4">Text files</h2><div class="top"><p class="src"><a name="v:openTextFile" class="def">openTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Filesystem.html#t:Handle">Handle</a> <a href="src/Filesystem.html#openTextFile" class="link">Source</a></p><div class="doc"><p>Open a file in text mode, and return an open <code>Handle</code>. The <code>Handle</code>
 should be closed with <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-IO-Handle.html#v:hClose">hClose</a></code> when it is no longer needed.</p><p><code><a href="Filesystem.html#v:withTextFile">withTextFile</a></code> is easier to use, because it will handle the
 <code>Handle</code>&#8217;s lifetime automatically.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:withTextFile" class="def">withTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="Filesystem.html#t:IOMode">IOMode</a> -&gt; (<a href="Filesystem.html#t:Handle">Handle</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a <a href="src/Filesystem.html#withTextFile" class="link">Source</a></p><div class="doc"><p>Open a file in text mode, and pass its <code>Handle</code> to a provided
 computation. The <code>Handle</code> will be automatically closed when the
 computation returns.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:readTextFile" class="def">readTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Filesystem.html#readTextFile" class="link">Source</a></p><div class="doc"><p>Read in the entire content of a text file.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:writeTextFile" class="def">writeTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#writeTextFile" class="link">Source</a></p><div class="doc"><p>Replace the entire content of a text file with the provided
 <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:appendTextFile" class="def">appendTextFile</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#appendTextFile" class="link">Source</a></p><div class="doc"><p>Append <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> to a file. If the file does not exist, it will
 be created.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h1 id="g:5">Directories</h1><div class="top"><p class="src"><a name="v:isDirectory" class="def">isDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Filesystem.html#isDirectory" class="link">Source</a></p><div class="doc"><p>Check if a directory exists at the given path.</p><p>Symbolic links are resolved to their targets before checking their type.</p><p>This computation does not throw exceptions.</p></div></div><div class="top"><p class="src"><a name="v:canonicalizePath" class="def">canonicalizePath</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#canonicalizePath" class="link">Source</a></p><div class="doc"><p>Resolve symlinks and &quot;..&quot; path elements to return a canonical path.
 It is intended that two paths referring to the same object will always
 resolve to the same canonical path.</p><p>Note that on many operating systems, it is impossible to guarantee that
 two paths to the same file will resolve to the same canonical path.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p><p>Since: 0.1.1</p></div></div><div class="top"><p class="src"><a name="v:listDirectory" class="def">listDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a>] <a href="src/Filesystem.html#listDirectory" class="link">Source</a></p><div class="doc"><p>List objects in a directory, excluding <code>&quot;.&quot;</code> and <code>&quot;..&quot;</code>. Each
 returned <code><a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></code> includes the path of the directory. Entries are not
 sorted.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:6">Creating directories</h2><div class="top"><p class="src"><a name="v:createDirectory" class="def">createDirectory</a> <a href="src/Filesystem.html#createDirectory" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Succeed if the directory already exists</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Create a directory at a given path. The user may choose whether it is
 an error for a directory to already exist at that path.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:createTree" class="def">createTree</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#createTree" class="link">Source</a></p><div class="doc"><p>Create a directory at a given path, including any parents which might
 be missing.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:7">Removing directories</h2><div class="top"><p class="src"><a name="v:removeDirectory" class="def">removeDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#removeDirectory" class="link">Source</a></p><div class="doc"><p>Remove an empty directory.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:removeTree" class="def">removeTree</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#removeTree" class="link">Source</a></p><div class="doc"><p>Recursively remove a directory tree rooted at the given path.</p><p>This computation does not follow symlinks. If the tree contains symlinks,
 the links themselves will be removed, but not the objects they point to.</p><p>If the root path is a symlink, then it will be treated as if it were a
 regular directory.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:8">Current working directory</h2><div class="top"><p class="src"><a name="v:getWorkingDirectory" class="def">getWorkingDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getWorkingDirectory" class="link">Source</a></p><div class="doc"><p>Get the current working directory.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:setWorkingDirectory" class="def">setWorkingDirectory</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#setWorkingDirectory" class="link">Source</a></p><div class="doc"><p>Set the current working directory.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h2 id="g:9">Commonly used paths</h2><div class="top"><p class="src"><a name="v:getHomeDirectory" class="def">getHomeDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getHomeDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s home directory. This is useful for building paths
 to more specific directories.</p><p>For directing the user to open or safe a document, use
 <code><a href="Filesystem.html#v:getDocumentsDirectory">getDocumentsDirectory</a></code>.</p><p>For data files the user does not explicitly create, such as automatic
 saves, use <code><a href="Filesystem.html#v:getAppDataDirectory">getAppDataDirectory</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:getDesktopDirectory" class="def">getDesktopDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getDesktopDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s desktop directory. This is a good starting point for
 file dialogs and other user queries. For data files the user does not
 explicitly create, such as automatic saves, use <code><a href="Filesystem.html#v:getAppDataDirectory">getAppDataDirectory</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:getDocumentsDirectory" class="def">getDocumentsDirectory</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getDocumentsDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s documents directory. This is a good place to save
 user&#8208;created files. For data files the user does not explicitly
 create, such as automatic saves, use <code><a href="Filesystem.html#v:getAppDataDirectory">getAppDataDirectory</a></code>.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:getAppDataDirectory" class="def">getAppDataDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getAppDataDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s application data directory, given an application
 label. This directory is where applications should store data the user did
 not explicitly create, such as databases and automatic saves.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:getAppCacheDirectory" class="def">getAppCacheDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getAppCacheDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s application cache directory, given an application
 label. This directory is where applications should store caches, which
 might be large and can be safely deleted.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><div class="top"><p class="src"><a name="v:getAppConfigDirectory" class="def">getAppConfigDirectory</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> <a href="src/Filesystem.html#getAppConfigDirectory" class="link">Source</a></p><div class="doc"><p>Get the user&#8217;s application configuration directory, given an
 application label. This directory is where applications should store their
 configurations and settings.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div><h1 id="g:10">Other</h1><div class="top"><p class="src"><a name="v:rename" class="def">rename</a> :: <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/libghc-system-filepath-doc/html/Filesystem-Path.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Filesystem.html#rename" class="link">Source</a></p><div class="doc"><p>Rename a filesystem object.</p><p>This computation throws <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html#t:IOError">IOError</a></code> on failure. See &#8220;Classifying
 I/O errors&#8221; in the <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO-Error.html">System.IO.Error</a> documentation for information on
 why the failure occured.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>