code: public File getOutputFile(File input, String ext) {
          File source;
          File destination;
          if (input.getAbsolutePath().startsWith(internalSources.getAbsolutePath())) {
              source = internalSources;
              destination = destinationForInternals;
          } else if (input.getAbsolutePath().startsWith(externalSources.getAbsolutePath())) {
              source = externalSources;
              destination = destinationForExternals;
          } else {
              return null;
          }
  
          String jsFileName = input.getName().substring(0, input.getName().length() - ".ts".length()) + "." + ext;
          String path = input.getParentFile().getAbsolutePath().substring(source.getAbsolutePath().length());
          return new File(destination, path + "/" + jsFileName);
  
      }
docs: Gets the output file for the given input and the given extension.
  
  @param input the input file
  @param ext   the extension
  @return the output file, may not exist