Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. private String getOutputDir(String projName){
  2. String newPath = "Projects" + File.separator + projName;
  3.  
  4.  
  5. File pathFile = new File(newPath);
  6.  
  7. int i = 1;
  8. while(pathFile.exists()){
  9. pathFile = new File(newPath + "-" + 1);
  10. i++;
  11. }
  12.  
  13. newPath += "-" + Integer.toString(i);
  14. newPath += File.separator + "src";
  15. return newPath;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement