
  -spec set_cwd(Dir) -> ok | {error, Reason}
                   when
                       Dir :: name() | EncodedBinary,
                       EncodedBinary :: binary(),
                       Reason :: posix() | badarg | no_translation.

  Sets the current working directory of the file server to Dir.
  Returns ok if successful.

  The functions in the module file usually treat binaries as raw
  filenames, that is, they are passed "as is" even when the encoding
  of the binary does not agree with native_name_encoding().
  However, this function expects binaries to be encoded according to
  the value returned by native_name_encoding().

  Typical error reasons are:

  enoent:
    The directory does not exist.

  enotdir:
    A component of Dir is not a directory. On some platforms, 
    enoent is returned.

  eacces:
    Missing permission for the directory or one of its parents.

  badarg:
    Dir has an improper type, such as tuple.

  no_translation:
    Dir is a binary() with characters coded in ISO-latin-1 and
    the VM is operating with unicode filename encoding.

  Warning:
    In a future release, a bad type for argument Dir will
    probably generate an exception.
