hsfm/HSFM-FileSystem-UtilTypes.html

18 lines
7.2 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.UtilTypes</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_HSFM-FileSystem-UtilTypes.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSFM-FileSystem-UtilTypes.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>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">HSFM.FileSystem.UtilTypes</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides high-level IO related file operations like
copy, delete, move and so on. It only operates on `Path Abs` which
guarantees us well-typed paths which are absolute.</p><p>Some functions are just path-safe wrappers around
unix functions, others have stricter exception handling
and some implement functionality that doesn't have a unix
counterpart (like <code>copyDirRecursive</code>).</p><p>Some of these operations are due to their nature not _atomic_, which
means they may do multiple syscalls which form one context. Some
of them also have to examine the filetypes explicitly before the
syscalls, so a reasonable decision can be made. That means
the result is undefined if another process changes that context
while the non-atomic operation is still happening. However, where
possible, as few syscalls as possible are used and the underlying
exception handling is kept.</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:FileOperation">FileOperation</a><ul class="subs"><li>= <a href="#v:FCopy">FCopy</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Copy">Copy</a></li><li>| <a href="#v:FMove">FMove</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Move">Move</a></li><li>| <a href="#v:FDelete">FDelete</a> [Path Abs]</li><li>| <a href="#v:FOpen">FOpen</a> (Path Abs)</li><li>| <a href="#v:FExecute">FExecute</a> (Path Abs) [<a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a>]</li><li>| <a href="#v:None">None</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Copy">Copy</a><ul class="subs"><li>= <a href="#v:PartialCopy">PartialCopy</a> [Path Abs]</li><li>| <a href="#v:Copy">Copy</a> [Path Abs] (Path Abs)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Move">Move</a><ul class="subs"><li>= <a href="#v:PartialMove">PartialMove</a> [Path Abs]</li><li>| <a href="#v:Move">Move</a> [Path Abs] (Path Abs)</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:FCollisonMode">FCollisonMode</a><ul class="subs"><li>= <a href="#v:Strict">Strict</a></li><li>| <a href="#v:Overwrite">Overwrite</a></li><li>| <a href="#v:OverwriteAll">OverwriteAll</a></li><li>| <a href="#v:Skip">Skip</a></li><li>| <a href="#v:Rename">Rename</a> (Path Fn)</li></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FileOperation" class="def">FileOperation</a> <a href="src/HSFM-FileSystem-UtilTypes.html#FileOperation" class="link">Source</a></p><div class="doc"><p>Data type describing file operations.
Useful to build up a list of operations or delay operations.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FCopy" class="def">FCopy</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Copy">Copy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:FMove" class="def">FMove</a> <a href="HSFM-FileSystem-UtilTypes.html#t:Move">Move</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:FDelete" class="def">FDelete</a> [Path Abs]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:FOpen" class="def">FOpen</a> (Path Abs)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:FExecute" class="def">FExecute</a> (Path Abs) [<a href="https://hackage.haskell.org/package/bytestring-0.10.6.0/docs/Data-ByteString.html#t:ByteString">ByteString</a>]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:None" class="def">None</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Copy" class="def">Copy</a> <a href="src/HSFM-FileSystem-UtilTypes.html#Copy" class="link">Source</a></p><div class="doc"><p>Data type describing partial or complete file copy operation.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PartialCopy" class="def">PartialCopy</a> [Path Abs]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Copy" class="def">Copy</a> [Path Abs] (Path Abs)</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Move" class="def">Move</a> <a href="src/HSFM-FileSystem-UtilTypes.html#Move" class="link">Source</a></p><div class="doc"><p>Data type describing partial or complete file move operation.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PartialMove" class="def">PartialMove</a> [Path Abs]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Move" class="def">Move</a> [Path Abs] (Path Abs)</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FCollisonMode" class="def">FCollisonMode</a> <a href="src/HSFM-FileSystem-UtilTypes.html#FCollisonMode" class="link">Source</a></p><div class="doc"><p>Collision modes that describe the behavior in case a file collision
happens.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Strict" class="def">Strict</a></td><td class="doc"><p>fail if the target already exists</p></td></tr><tr><td class="src"><a name="v:Overwrite" class="def">Overwrite</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:OverwriteAll" class="def">OverwriteAll</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Skip" class="def">Skip</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Rename" class="def">Rename</a> (Path Fn)</td><td class="doc empty">&nbsp;</td></tr></table></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>