I'm using the following Java code to create a file inside several folders:
Path pathOut = Paths.get("./", year, month, day, processId, "METADATA.txt");
File fileOut = pathOut.toFile();
boolean f = fileOut.getParentFile().mkdirs();
It works perfectly, but I'd need to set the permissions for each subfolder to '777'. Is it possible using mkdirs
method or do I need to change the logic and use another approach?
Thanks!