Improve documentation

This commit is contained in:
Julian Ospald 2016-06-05 03:22:11 +02:00
parent 64ae6db83a
commit a27d4ed55d
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 18 additions and 6 deletions

View File

@ -352,9 +352,17 @@ copyDirRecursive fromp destdirp cm rm
-- - `InvalidArgument` if source file is wrong type (not a symlink)
-- - `PermissionDenied` if output directory cannot be written to
-- - `PermissionDenied` if source directory cannot be opened
-- - `AlreadyExists` if destination file already exists (for `Strict` CopyMode only)
-- - `SameFile` if source and destination are the same file (`HPathIOException`)
--
--
-- Throws in `Strict` mode only:
--
-- - `AlreadyExists` if destination file already exists
--
-- Throws in `Overwrite` mode only:
--
-- - `UnsatisfiedConstraints` if destination file is non-empty directory
--
-- Note: calls `symlink`
recreateSymlink :: Path Abs -- ^ the old symlink file
-> Path Abs -- ^ destination file
@ -402,9 +410,12 @@ recreateSymlink symsource newsym cm
-- - `PermissionDenied` if output directory is not writable
-- - `PermissionDenied` if source directory can't be opened
-- - `InvalidArgument` if source file is wrong type (symlink or directory)
-- - `AlreadyExists` if destination already exists (for `Strict` CopyMode only)
-- - `SameFile` if source and destination are the same file (`HPathIOException`)
--
-- Throws in `Strict` mode only:
--
-- - `AlreadyExists` if destination already exists
--
-- Note: calls `sendfile` and possibly `read`/`write` as fallback
copyFile :: Path Abs -- ^ source file
-> Path Abs -- ^ destination file
@ -720,12 +731,13 @@ renameFile fromf tof = do
-- - `NoSuchThing` if source file does not exist
-- - `PermissionDenied` if output directory cannot be written to
-- - `PermissionDenied` if source directory cannot be opened
-- - `FileDoesExist` if destination file already exists (`HPathIOException`),
-- only for `Strict` CopyMode
-- - `DirDoesExist` if destination directory already exists (`HPathIOException`)
-- only for `Strict` CopyMode
-- - `SameFile` if destination and source are the same file (`HPathIOException`)
--
-- Throws in `Strict` mode only:
--
-- - `FileDoesExist` if destination file already exists (`HPathIOException`)
-- - `DirDoesExist` if destination directory already exists (`HPathIOException`)
--
-- Note: calls `rename` (but does not allow to rename over existing files)
moveFile :: Path Abs -- ^ file to move
-> Path Abs -- ^ destination