void (@NotNull Project project) { WriteCommandAction.runWriteCommandAction(project, () -> { VirtualFile sourceRoot = getSourceRoot(); if (sourceRoot == null) { return; } for (VirtualFile child : sourceRoot.getChildren()) { try { child.delete(LightPlatformTestCase.class); } catch (IOException | IllegalStateException e) { // TempFileSystem.deleteFile can throw not IOException but IllegalStateException //noinspection CallToPrintStackTrace e.printStackTrace(); } } }); }