
  -spec rename(Source, Destination) -> ok | {error, Reason}
                  when
                      Source :: name_all(),
                      Destination :: name_all(),
                      Reason :: posix() | badarg.

  Tries to rename the file Source to Destination. It can be used
  to move files (and directories) between directories, but it is not
  sufficient to specify the destination only. The destination
  filename must also be specified. For example, if bar is a normal
  file and foo and baz are directories, rename("foo/bar",
  "baz") returns an error, but rename("foo/bar", "baz/bar")
  succeeds. Returns ok if it is successful.

  Note:
    Renaming of open files is not allowed on most platforms (see 
    eacces below).

  Typical error reasons:

  eacces:
    Missing read or write permissions for the parent directories
    of Source or Destination. On some platforms, this error is
    given if either Source or Destination is open.

  eexist:
    Destination is not an empty directory. On some platforms,
    also given when Source and Destination are not of the same
    type.

  einval:
    Source is a root directory, or Destination is a
    subdirectory of Source.

  eisdir:
    Destination is a directory, but Source is not.

  enoent:
    Source does not exist.

  enotdir:
    Source is a directory, but Destination is not.

  exdev:
    Source and Destination are on different file systems.
