List<VirtualFile> (final File[] files) { final List<VirtualFile> result = new ArrayList<>(); final LocalFileSystem lfs = LocalFileSystem.getInstance(); for (File file : files) { VirtualFile vf = lfs.findFileByIoFile(file); if (vf == null) { vf = lfs.refreshAndFindFileByIoFile(file); } if (vf != null) { result.add(vf); } } return result; }