}
private void createParentDir(String name) {
String[] dirs = DbTpl.getParentDir(name);
DbTpl dirTpl;
Tpl parentDir;
for (String dir : dirs) {
parentDir = get(dir);
if (parentDir != null && !parentDir.isDirectory()) {
throw new ParentDirIsFileExceptioin(
"parent directory is a file: " + parentDir.getName());
} else if (parentDir == null) {
dirTpl = new DbTpl();
dirTpl.setId(dir);
dirTpl.setDirectory(true);
dao.save(dirTpl);