code: private void indexDirectory(String path) throws Exception {
          fr.pilato.elasticsearch.crawler.fs.beans.Path pathObject = new fr.pilato.elasticsearch.crawler.fs.beans.Path();
          // The real and complete path
          pathObject.setReal(path);
          String rootdir = path.substring(0, path.lastIndexOf(File.separator));
          // Encoded version of the parent dir
          pathObject.setRoot(SignTool.sign(rootdir));
          // The virtual URL (not including the initial root dir)
          pathObject.setVirtual(computeVirtualPathName(stats.getRootPath(), path));
  
          indexDirectory(SignTool.sign(path), pathObject);
      }
docs: Index a directory
  @param path complete path like /path/to/subdir