code: public static void main(final String[] args) throws InjectionException, IOException {
      Validate.isTrue(args.length == 4, "Job resource uploader requires 4 args");
      final File localFile = new File(args[0]);
      Validate.isTrue(localFile.exists(), "Local file does not exist " + localFile.getAbsolutePath());
      final String fileType = args[1];
      final String jobSubmissionDirectory = args[2];
      final String localOutputPath = args[3];
  
      LOG.log(Level.INFO, "Received args: LocalPath " + localFile.getAbsolutePath() + " Submission directory " +
          jobSubmissionDirectory + " LocalOutputPath " + localOutputPath);
      final Configuration configuration = Tang.Factory.getTang().newConfigurationBuilder()
          .bindImplementation(RuntimeClasspathProvider.class, YarnClasspathProvider.class)
          .bindConstructor(org.apache.hadoop.yarn.conf.YarnConfiguration.class, YarnConfigurationConstructor.class)
          .build();
  
      final JobUploader jobUploader = Tang.Factory.getTang()
          .newInjector(configuration)
          .getInstance(JobUploader.class);
      final LocalResource localResource = jobUploader.createJobFolder(jobSubmissionDirectory)
          .uploadAsLocalResource(localFile, LocalResourceType.valueOf(fileType));
  
      // Output: <UploadedPath>;<LastModificationUnixTimestamp>;<ResourceSize>
      final URL resource = localResource.getResource();
      final String outputString = String.format("%s://%s:%d%s;%d;%d", resource.getScheme(), resource.getHost(),
          resource.getPort(), resource.getFile(), localResource.getTimestamp(), localResource.getSize());
      LOG.log(Level.INFO, "Writing output: " + outputString);
      try (Writer writer = new BufferedWriter(new OutputStreamWriter(
        new FileOutputStream(localOutputPath), "utf-8"))) {
        writer.write(outputString);
      }
  
      LOG.log(Level.FINER, "Done writing output file");
    }
docs: This class is invoked from Org.Apache.REEF.Client.Yarn.LegacyJobResourceUploader in .NET code.
  Arguments:
  [0] : Local path for file.
  [1] : Type for file.
  [2] : Path of job submission directory
  [3] : File path for output with details of uploaded resource