code: static StorageLocationType getType(StorageDirectory sd) {
      if ((sd instanceof NNStorageDirectory)) {
        return ((NNStorageDirectory) sd).type;
      } 
      // by default all are local
      return StorageLocationType.LOCAL;
    }
docs: Get the type of given directory.