cpp/experimental/fs/copy

Copies files and directories, with a variety of options

@1@ The default, equivalent to with  used as @2@ Copies the file or directory  to file or directory, using the copy options indicated by. The behavior is undefined if there is more than one option in any of the option group present in  (even in the  group, which is not relevant to )

The behavior is as follows:
 * First, before doing anything else, obtains type and permissions of by no more than single call to  (or, if  or  are present in, by a call to ).
 * If necessary, obtains the status of the same way, by no more than a single status or symlink_status call.
 * If does not exist, reports an error.
 * If and  are the same file as determined by, reports an error
 * If either or  is not a regular file, a directory, or a symlink, as determined by, reports an error
 * If is a directory, but  is a regular file, reports an error
 * If is a symbolic link, then
 * If is present in, does nothing.
 * Otherwise, if does not exist and  is present in, then behaves as if
 * Otherwise, reports an error


 * Otherwise, if is a regular file, then
 * If is present in, does nothing
 * Otherwise, if is present in, creates a symlink to . Note:  must be an absolute path unless  is in the current directory.
 * Otherwise, if is present in, creates a hard link to
 * Otherwise, if is a directory, then behaves as if  (creates a copy of  as a file in the directory )
 * Otherwise, behaves as if (copies the file)


 * Otherwise, if is a directory and either  has  or is ,
 * If does not exist, first executes  (creates the new directory with a copy of the old directory's attributes)
 * Then, whether already existed or was just created, iterates over the files contained in  as if by  and for each directory entry, recursively calls, where unspecified is a special bit that has no other effect when set in . (The sole purpose of setting this bit is to prevent recursive copying subdirectories if  is .)


 * Otherwise does nothing

Return value
(none)