code: @Nonnull
    public static FileIOError deleteDirRecursive (@Nonnull final File aDir)
    {
      ValueEnforcer.notNull (aDir, "Directory");
  
      // Non-existing directory?
      if (!FileHelper.existsDir (aDir))
        return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_DIR_RECURSIVE, aDir);
  
      if (isExceptionOnDeleteRoot ())
      {
        // Check that we're not deleting the complete hard drive...
        if (aDir.getAbsoluteFile ().getParent () == null)
          throw new IllegalArgumentException ("Aren't we deleting the full drive: '" + aDir.getAbsolutePath () + "'");
      }
  
      // Is the parent directory writable?
      final File aParentDir = aDir.getParentFile ();
      if (aParentDir != null && !aParentDir.canWrite ())
        return EFileIOErrorCode.SOURCE_PARENT_NOT_WRITABLE.getAsIOError (EFileIOOperation.DELETE_DIR_RECURSIVE, aDir);
  
      // iterate directory
      for (final File aChild : FileHelper.getDirectoryContent (aDir))
      {
        // is it a file or a directory or ...
        if (aChild.isDirectory ())
        {
          // Ignore "." and ".." directory
          if (FilenameHelper.isSystemInternalDirectory (aChild.getName ()))
            continue;
  
          // recursive call
          final FileIOError eCode = deleteDirRecursive (aChild);
          if (eCode.isFailure ())
            return eCode;
        }
        else
          if (aChild.isFile ())
          {
            // delete file
            final FileIOError eCode = deleteFile (aChild);
            if (eCode.isFailure ())
              return eCode;
          }
          else
          {
            // Neither directory no file - don't know how to handle
            return EFileIOErrorCode.OBJECT_CANNOT_BE_HANDLED.getAsIOError (EFileIOOperation.DELETE_DIR_RECURSIVE, aChild);
          }
      }
  
      // Now this directory should be empty -> delete as if empty
      return deleteDir (aDir);
    }
docs: Delete an existing directory including all child objects.
  
  @param aDir
  The directory to be deleted. May not be <code>null</code>.
  @return A non-<code>null</code> error code.