code: public static void addSourceFolder(IArchiveBuilder builder, File sourceFolder)
              throws ApkCreationException, DuplicateFileException {
          if (sourceFolder.isDirectory()) {
              try {
                  // file is a directory, process its content.
                  File[] files = sourceFolder.listFiles();
                  if (files != null) {
                      for (File file : files) {
                          processFileForResource(builder, file, null);
                      }
                  }
              } catch (DuplicateFileException e) {
                  throw e;
              } catch (Exception e) {
                  throw new ApkCreationException(e, "Failed to add %s", sourceFolder);
              }
          } else {
              // not a directory? check if it's a file or doesn't exist
              if (sourceFolder.exists()) {
                  throw new ApkCreationException("%s is not a folder", sourceFolder);
              } else {
                  throw new ApkCreationException("%s does not exist", sourceFolder);
              }
          }
      }
docs: Adds the resources from a source folder to a given {@link IArchiveBuilder}
  @param sourceFolder the source folder.
  @throws ApkCreationException if an error occurred
  @throws DuplicateFileException if a file conflicts with another already added to the APK
  at the same location inside the APK archive.