on create if parent not new code example
Example: java create file and parent directories
if(!Files.exists(Path.of([PATH])))
{
File f = new File([PATH]);
f.getParentFile().mkdirs();
}
if(!Files.exists(Path.of([PATH])))
{
File f = new File([PATH]);
f.getParentFile().mkdirs();
}