From 6da01e382ffdd906fb167b4f28012144f9444f0a Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 5 Jun 2016 16:31:08 +0200 Subject: [PATCH] Improve documentation --- src/HPath/IO.hs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/HPath/IO.hs b/src/HPath/IO.hs index dc50e7c..5cc8107 100644 --- a/src/HPath/IO.hs +++ b/src/HPath/IO.hs @@ -247,8 +247,13 @@ data CopyMode = Strict -- ^ fail if any target exists --- |Copies a directory recursively to the given destination. --- Does not follow symbolic links. +-- |Copies the contents of a directory recursively to the given destination. +-- Does not follow symbolic links. This behaves like: +-- +-- @ +-- mkdir \/destination\/dir +-- cp -R \/source\/dir\/* \/destination\/dir\/ +-- @ -- -- For directory contents, this will ignore any file type that is not -- `RegularFile`, `SymbolicLink` or `Directory`. @@ -292,8 +297,9 @@ data CopyMode = Strict -- ^ fail if any target exists -- Throws in `Strict` CopyMode only: -- -- - `AlreadyExists` if destination already exists -copyDirRecursive :: Path Abs -- ^ source dir - -> Path Abs -- ^ full destination +copyDirRecursive :: Path Abs -- ^ copy contents of this source dir + -> Path Abs -- ^ to this full destination (parent dirs + -- are not automatically created) -> CopyMode -> RecursiveErrorMode -> IO ()