String copyToWorkDir(String filePath) throws IOException {
  Path srcFile=Paths.get(filePath);
  if (Files.exists(srcFile)) {
    checkDownloadFolder();
    Path newDir=Paths.get(downloadFolder);
    Path fileName=srcFile.getFileName();
    Files.copy(srcFile,newDir.resolve(fileName),StandardCopyOption.REPLACE_EXISTING);
    return fileName.toString();
  }
  return null;
}

String copyToWorkDir ( String filePath ) throws IOException { Path srcFile = Paths . get ( filePath ) ; if ( Files . exists ( srcFile ) ) { checkDownloadFolder ( ) ; Path newDir = Paths . get ( downloadFolder ) ; Path fileName = srcFile . getFileName ( ) ; Files . copy ( srcFile , newDir . resolve ( fileName ) , StandardCopyOption . REPLACE_EXISTING ) ; return fileName . toString ( ) ; } return null ; }
copy file to working directory .
