PsiDirectory (@NotNull PsiDirectory parent, @NotNull String subdirName) { final PsiDirectory sub = parent.findSubdirectory(subdirName); return sub == null ? WriteAction.compute(() -> parent.createSubdirectory(subdirName)) : sub; }