VirtualFile (@NotNull Path tempDir) { VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(FileUtil.toSystemIndependentName(tempDir.toString())); // null is ok, because Path can be only generated, but not created if (virtualFile != null) { synchronizeTempDirVfs(virtualFile); } return virtualFile; }