* move FileOperation/Copy/Move types to its own UtilTypes module
* remove runFileOp, since it's hard to really do the correct
thing here for all possible exceptions... instead, let the
GUI logic handle this
* introduce copyDirRecursiveOverwrite, copyFileOverwrite and
easyCopyOverwrite
* use our own throwSameFile on functions to distinguish between
"same file" and "file already exists"
* don't follow destination in copyFile* either
* improve throwSameFile, by examining device and file ids
* add isWritable
* improve documentation
* adjust and fix tests
This makes the FileOperations module more low-level, since we now
handle everything via 'Path Abs' and only leave 'File a' for
e.g. GUI purposes.
Also fixes various bugs in the Errors module.
This depends on custom changes in posix-paths.
We have now ditched AnchoredFile and just use File with Path Abs
in the path field.
This is useful since we now:
* don't allow "." or ".." as filenames anymore
* normalise paths in our path parsers and reject paths with ".."
This also allows us to know that filepaths are always valid. In addition
the 'basename' function from hpath may throw an exception if run
on the root dir "/". This exception is basically uncatched currently,
which is fine, because it's not a selectable directory.
We now don't safe an AnchoredFile anymore, but a Path and
construct the AnchoredFile just before the operation is carried out.
This means the copy and move buffers cannot contain stale references
to files that don't exist anymore.