Open DevShivmohan opened 1 year ago
/** * * @param sourceFileName source file name which will copy * @return return no. of bytes that copied * @throws IOException */ public long copy(String sourceFileName) throws IOException { Path destinationPath= Paths.get("C:\\Users\\Dell\\Downloads\\log\\copy"+sourceFileName); InputStream sourceInputStream=new FileInputStream("C:\\Users\\Dell\\Downloads\\log\\"+sourceFileName); return Files.copy(sourceInputStream,destinationPath, StandardCopyOption.REPLACE_EXISTING); }
Copy large file