# Functions
CopyDir recursively copies a directory tree, attempting to preserve permissions.
CopyFile copies the contents of the file named src to the file named by dst.
RemoveDirs removes dir and its parent directories until the directory is not empty.
TryLinkDir recursively copies a directory tree, attempting to preserve permissions.
TryLinkFile tries os.Link() at first, but if it failed call CopyFile to copy the contents of src to dst.