code: StorageDirectory getStorageDirectory(URI uri) {
      try {
        uri = Util.fileAsURI(new File(uri));
        Iterator<StorageDirectory> it = dirIterator();
        for (; it.hasNext(); ) {
          StorageDirectory sd = it.next();
          if (Util.fileAsURI(sd.getRoot()).equals(uri)) {
            return sd;
          }
        }
      } catch (IOException ioe) {
        LOG.warn("Error converting file to URI", ioe);
      }
      return null;
    }
docs: Return the storage directory corresponding to the passed URI
  @param uri URI of a storage directory
  @return The matching storage directory or null if none found