code: static boolean isPreferred(StorageLocationType type, StorageDirectory sd) {
      if ((sd instanceof NNStorageDirectory)) {
        return ((NNStorageDirectory) sd).type == type;
      } 
      // by default all are preferred
      return true;
    }
docs: Checks if we have information about this directory
  that it is preferred.
  @param type preferred type
  @param sd storage directory