// Root folder doesn't exist, so create it and all child folders
folder = app.create(Folder.class, parts[0]);
logger.log(Level.INFO, "Created root folder {0}", new Object[]{parts[0]});
for (int i = 1; i < parts.length - 1; i++) {
Folder childFolder = app.create(Folder.class, parts[i]);
childFolder.setProperty(Folder.parent, folder);
logger.log(Level.INFO, "Created {0} {1} with path {2}", new Object[]{childFolder.getType(), childFolder, FileHelper.getFolderPath(childFolder)});
folder = childFolder;
}