resources/src/main/java/org/robolectric/res/android/CppAssetManager.java
public AssetDir openDir(final String dirName) {
    synchronized (mLock) {

      AssetDir pDir = null;
      final Ref<SortedVector<AssetDir.FileInfo>> pMergedInfo;

      LOG_FATAL_IF(mAssetPaths.isEmpty(), "No assets added to AssetManager");
      Preconditions.checkNotNull(dirName);

      //printf("+++ openDir(%s) in '%s'\n", dirName, (final char*) mAssetBase);

      pDir = new AssetDir();

      /*
       * Scan the various directories, merging what we find into a single
       * vector.  We want to scan them in reverse priority order so that
       * the ".EXCLUDE" processing works correctly.  Also, if we decide we
       * want to remember where the file is coming from, we'll get the right
       * version.
       *
       * We start with Zip archives, then do loose files.
       */
      pMergedInfo = new Ref<>(new SortedVector<AssetDir.FileInfo>());

      int i = mAssetPaths.size();
      while (i > 0) {
        i--;
        final asset_path ap = mAssetPaths.get(i);
        if (ap.type == FileType.kFileTypeRegular) {
          ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
          scanAndMergeZipLocked(pMergedInfo, ap, kAssetsRoot, dirName);
        } else {
          ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
          scanAndMergeDirLocked(pMergedInfo, ap, kAssetsRoot, dirName);
        }
      }

//  #if 0
//        printf("FILE LIST:\n");
//        for (i = 0; i < (int) pMergedInfo.size(); i++) {
//          printf(" %d: (%d) '%s'\n", i,
//              pMergedInfo.itemAt(i).getFileType(),
//              ( final char*)pMergedInfo.itemAt(i).getFileName());
//        }
//  #endif

      pDir.setFileList(pMergedInfo.get());
      return pDir;
    }
  }
public AssetDir openDir(final String dirName) {
    synchronized (mLock) {

      AssetDir pDir = null;
      final Ref<SortedVector<AssetDir.FileInfo>> pMergedInfo;

      LOG_FATAL_IF(mAssetPaths.isEmpty(), "No assets added to AssetManager");
      Preconditions.checkNotNull(dirName);

      //printf("+++ openDir(%s) in '%s'\n", dirName, (final char*) mAssetBase);

      pDir = new AssetDir();

      /*
       * Scan the various directories, merging what we find into a single
       * vector.  We want to scan them in reverse priority order so that
       * the ".EXCLUDE" processing works correctly.  Also, if we decide we
       * want to remember where the file is coming from, we'll get the right
       * version.
       *
       * We start with Zip archives, then do loose files.
       */
      pMergedInfo = new Ref<>(new SortedVector<AssetDir.FileInfo>());

      int i = mAssetPaths.size();
      while (i > 0) {
        i--;
        final asset_path ap = mAssetPaths.get(i);
        if (ap.type == FileType.kFileTypeRegular) {
          ALOGV("Adding directory %s from zip %s", dirName, ap.path.string());
          scanAndMergeZipLocked(pMergedInfo, ap, kAssetsRoot, dirName);
        } else {
          ALOGV("Adding directory %s from dir %s", dirName, ap.path.string());
          scanAndMergeDirLocked(pMergedInfo, ap, kAssetsRoot, dirName);
        }
      }

//  #if 0
//        printf("FILE LIST:\n");
//        for (i = 0; i < (int) pMergedInfo.size(); i++) {
//          printf(" %d: (%d) '%s'\n", i,
//              pMergedInfo.itemAt(i).getFileType(),
//              ( final char*)pMergedInfo.itemAt(i).getFileName());
//        }
//  #endif

      pDir.setFileList(pMergedInfo.get());
      return pDir;
    }
  }
/*
Open a directory in the asset namespace.

An "asset directory" is simply the combination of all asset paths' "assets/" directories.

Pass in "" for the root dir.