code: private static void checkLocalDirs(String[] localDirs)
      throws DiskErrorException {
      boolean writable = false;
  
      if (localDirs != null) {
        for (int i = 0; i < localDirs.length; i++) {
          try {
            DiskChecker.checkDir(new File(localDirs[i]));
            writable = true;
          } catch(DiskErrorException e) {
            LOG.warn("Task Tracker local " + e.getMessage());
          }
        }
      }
  
      if (!writable)
        throw new DiskErrorException(
                                     "all local directories are not writable");
    }
docs: Check if the given local directories
  (and parent directories, if necessary) can be created.
  @param localDirs where the new TaskTracker should keep its local files.
  @throws DiskErrorException if all local directories are not writable