Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public void makeNewFiles {
  2. Date d = new Date();
  3. SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss dd-MM-yyyy");
  4. String ns = sdf.format(d);
  5. File ntf = File.createTempFile(ns, ".png", directory);
  6. }
  7.  
  8. public void makeNewFiles {
  9. Date d = new Date();
  10. SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss dd-MM-yyyy");
  11. String ns = sdf.format(d);
  12. File n1 = new File(directory, pathToActualFile);
  13. File n2;
  14.  
  15. if(n1.exists()) {
  16. n2 = new File(directory, ns + ".png");
  17. n2.createNewFile();
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement