void (PsiDirectory targetDirectory) { final PsiDirectory subdirectory = targetDirectory.findSubdirectory(packageName); assert subdirectory != null; final PsiDirectory emptyDir = subdirectory.findSubdirectory("subPack"); assert emptyDir != null; ApplicationManager.getApplication().runWriteAction(() -> { emptyDir.createFile(EMPTY_TXT); }); }