cpp/experimental/fs/rename

Moves or renames the filesystem object identified by to  as if by the POSIX rename:


 * If is a non-directory file, then  must be one of:
 * the same file as or a hardlink to it: nothing is done in this case
 * existing non-directory file: is first deleted, then, without allowing other processes to observe  as deleted, the pathname  is linked to the file and  is unlinked from the file. Write permissions are required to both the directory that contains  and the directory that contains.
 * non-existing file in an existing directory: The pathname is linked to the file and  is unlinked from the file. Write permissions are required to both the directory that contains  and the directory that contains.


 * If is a directory, then  must be one of:
 * the same directory as or a hardlink to it: nothing is done in this case
 * existing directory: is deleted if empty on POSIX systems, but this may be an error on other systems. If not an error, then  is first deleted, then, without allowing other processes to observe  as deleted, the pathname  is linked to the directory and  is unlinked from the directory. Write permissions are required to both the directory that contains  and the directory that contains.
 * non-existing directory, not ending with a directory separator, and whose parent directory exists: The pathname is linked to the directory and  is unlinked from the directory. Write permissions are required to both the directory that contains  and the directory that contains.


 * Symlinks are not followed: if is a symlink, it is itself renamed, not its target. If  is an existing symlink, it is itself erased, not its target.

Rename fails if
 * ends with or with
 * names a non-existing directory ending with a directory separator
 * is a directory which is an ancestor of

Return value
(none)