Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. String contentPath = "c:\temp\data";
  2. String tmpContentPath = "c:\temp\data.TMP";
  3. if (Files.exists(Paths.get(tmpContentPath)) && Files.list(Paths.get(tmpContentPath)).count() > 0) {
  4. FileUtils.deleteDirectory(new File(contentPath));
  5. Files.move(Paths.get(tmpContentPath), Paths.get(contentPath), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
  6. }
Add Comment
Please, Sign In to add comment