- private void createFolder(String dirName) throws Exception {
- String dirPath = dirName;
-
- File newDirectory = new File(dirPath);
- boolean isCreated = newDirectory.mkdirs();
- if (isCreated) {
- System.out.println("1. Successfully created directories, path: " + newDirectory.getCanonicalPath());
- } else if (newDirectory.exists()) {
- System.out.print("1. Directory path already exist, path: " + newDirectory.getCanonicalPath());
- } else {
- System.out.println("1. Unable to create directory");
- }