code: public static void createAllSymlink(Configuration conf, File jobCacheDir, File
        workDir)
      throws IOException{
      if ((jobCacheDir == null || !jobCacheDir.isDirectory()) ||
             workDir == null || (!workDir.isDirectory())) {
        return;
      }
      boolean createSymlink = getSymlink(conf);
      if (createSymlink){
        File[] list = jobCacheDir.listFiles();
        for (int i=0; i < list.length; i++){
          FileUtil.symLink(list[i].getAbsolutePath(),
                           new File(workDir, list[i].getName()).toString());
        }
      }
    }
docs: This method create symlinks for all files in a given dir in another
  directory
  @param conf the configuration
  @param jobCacheDir the target directory for creating symlinks
  @param workDir the directory in which the symlinks are created
  @throws IOException