docs: static List<String> uploadAndRegisterFiles(
  			Collection<File> shipFiles,
  			FileSystem fs,
  			Path targetHomeDir,
  			ApplicationId appId,
  			List<Path> remotePaths,
  			Map<String, LocalResource> localResources,
  			StringBuilder envShipFileList) throws IOException, URISyntaxException {
  
  		final List<String> classPaths = new ArrayList<>(2 + shipFiles.size());
  		for (File shipFile : shipFiles) {
  			if (shipFile.isDirectory()) {
  				// add directories to the classpath
  				java.nio.file.Path shipPath = shipFile.toPath();
  				final java.nio.file.Path parentPath = shipPath.getParent();
  
  				Files.walkFileTree(shipPath, new SimpleFileVisitor<java.nio.file.Path>() {
  					@Override
  					public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs)
  						throws IOException {
  						String fileName = file.getFileName().toString();
  						if (!(fileName.startsWith("flink-dist") &&
  								fileName.endsWith("jar"))) {
  
  							java.nio.file.Path relativePath = parentPath.relativize(file);
  
  							String key = relativePath.toString();
  							try {
  								Path remotePath = setupSingleLocalResource(
  									key,
  									fs,
  									appId,
  									new Path(file.toUri()),
  									localResources,
  									targetHomeDir,
  									relativePath.getParent().toString());
  								remotePaths.add(remotePath);
  								envShipFileList.append(key).append("=")
  									.append(remotePath).append(",");
  
  								// add files to the classpath
  								classPaths.add(key);
  							} catch (URISyntaxException e) {
  								throw new IOException(e);
  							}
  						}
  
  						return FileVisitResult.CONTINUE;
  					}
  				});
  			} else {
  				if (!(shipFile.getName().startsWith("flink-dist") && shipFile.getName().endsWith("jar"))) {
  					Path shipLocalPath = new Path(shipFile.toURI());
  					String key = shipFile.getName();
  					Path remotePath = setupSingleLocalResource(
  						key, fs, appId, shipLocalPath, localResources, targetHomeDir, "");
  					remotePaths.add(remotePath);
  					envShipFileList.append(key).append("=").append(remotePath).append(",");
  
  					// add files to the classpath
  					classPaths.add(key);
  				}
  			}
  
  		}
  		return classPaths;
  	}