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

Since:
  OTP 23.0

  Deletes file or directory File. If File is a directory, its
  contents is first recursively deleted. Returns:

  ok:
    The operation completed without errors.

  {error, posix()}:
    An error occurred when accessing or deleting File. If some
    file or directory under File could not be deleted, File
    cannot be deleted as it is non-empty, and {error, eexist} is
    returned.
