void () { final VirtualFile file = createChildData(myPrjDir1, "a.txt"); FileManagerImpl fileManager = (FileManagerImpl)myPsiManager.getFileManager(); fileManager.findFile(file); WriteCommandAction.writeCommandAction(getProject()).run(() -> delete(file)); fileManager.checkConsistency(); }