
  -spec del_dir(Dir) -> ok | {error, Reason}
                   when Dir :: name_all(), Reason :: posix() | badarg.

  Tries to delete directory Dir. The directory must be empty
  before it can be deleted. Returns ok if successful.

  Typical error reasons:

  eacces:
    Missing search or write permissions for the parent directories
    of Dir.

  eexist:
    The directory is not empty.

  enoent:
    The directory does not exist.

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

  einval:
    Attempt to delete the current directory. On some platforms, 
    eacces is returned instead.
