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

  Tries to delete directory [;;4mDir[0m. The directory must be empty
  before it can be deleted. Returns [;;4mok[0m if successful.

  Typical error reasons:

  [;;4m[;;4meacces[0m[0m:
    Missing search or write permissions for the parent directories
    of [;;4mDir[0m.

  [;;4m[;;4meexist[0m[0m:
    The directory is not empty.

  [;;4m[;;4menoent[0m[0m:
    The directory does not exist.

  [;;4m[;;4menotdir[0m[0m:
    A component of [;;4mDir[0m is not a directory. On some platforms, [;;4m[0m
    [;;4menoent[0m is returned instead.

  [;;4m[;;4meinval[0m[0m:
    Attempt to delete the current directory. On some platforms, [;;4m[0m
    [;;4meacces[0m is returned instead.
