code: private void synchronize(String pkg, File path, Configuration conf) {
      if (!path.isDirectory()) {
        throw new IllegalArgumentException(path.getAbsolutePath().concat(" is not a directory."));
      }
  
      for (File file : path.listFiles()) {
        if (file.isDirectory()) {
          synchronize(combine(pkg, file.getName()), file, conf);
        } else {
          String fileName = file.getName();
          int extensionSeparator = fileName.lastIndexOf('.');
          if (extensionSeparator >= 0) {
            String extension = fileName.substring(extensionSeparator + 1);
            if (extension.equals("class")) {
              String className = combine(pkg, fileName.substring(0, extensionSeparator));
              try {
                byte[] digest = conf.getJobService().getClassDigest(className);
                byte[] def = FileUtil.getFileContents(file);
                byte[] localDigest = getDigest(def, conf);
                if (digest == null || !Arrays.equals(digest, localDigest)) {
                  conf.getJobService().setClassDefinition(className, def);
                  System.out.print(digest == null ? "+ " : "U ");
                  System.out.println(className);
                } else if (conf.verbose) {
                  System.out.print("= ");
                  System.out.println(className);
                }
              } catch (FileNotFoundException e) {
                throw new UnexpectedException(e);
              } catch (IOException e) {
                System.out.print("E ");
                System.out.println(className);
              }
            }
          }
        }
      }
    }
docs: Synchronizes all classes in the given directory tree to the server.
  @param pkg The name of the package associated with the root of the
  directory tree.
  @param path The <code>File</code> indicating the root of the directory
  tree.
  @param conf The application command line options.