I\'ve got a conditional to check if a certain file exists before proceeding (./logs/error.log). If it isn\'t found I want to create it. However, will
./logs/error.log
File directory = new File(tmp.getParentFile().getAbsolutePath()); directory.mkdirs();
If the directories already exist, nothing will happen, so you don't need any checks.