code: @Nonnull
    public static FileIOError deleteFile (@Nonnull final File aFile)
    {
      ValueEnforcer.notNull (aFile, "File");
  
      if (!FileHelper.existsFile (aFile))
        return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
  
      // Is the parent directory writable?
      final File aParentDir = aFile.getParentFile ();
      if (aParentDir != null && !aParentDir.canWrite ())
        return EFileIOErrorCode.SOURCE_PARENT_NOT_WRITABLE.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
  
      try
      {
        Files.delete (aFile.toPath ());
        return EFileIOErrorCode.NO_ERROR.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
      }
      catch (final NoSuchFileException ex)
      {
        return EFileIOErrorCode.SOURCE_DOES_NOT_EXIST.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
      }
      catch (final DirectoryNotEmptyException ex)
      {
        return EFileIOErrorCode.OPERATION_FAILED.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
      }
      catch (final IOException ex)
      {
        return EFileIOErrorCode.IO_ERROR.getAsIOError (EFileIOOperation.DELETE_FILE, aFile);
      }
      catch (final SecurityException ex)
      {
        return EFileIOErrorCode.getSecurityAsIOError (EFileIOOperation.DELETE_FILE, ex);
      }
    }
docs: Delete an existing file.
  
  @param aFile
  The file to be deleted. May not be <code>null</code>.
  @return A non-<code>null</code> error code.