public static void refreshFiles(Project project, HashSet<FilePath> paths) { for (FilePath path : paths) { VirtualFile vFile = path.getVirtualFile(); if (vFile != null) { if (vFile.isDirectory()) { markFileAsDirty(project, vFile); } else { vFile.refresh(true, vFile.isDirectory()); } } } }
public static void markFileAsDirty(final Project project, final String path) { final FilePath filePath = VcsContextFactory.SERVICE.getInstance().createFilePathOn(new File(path)); markFileAsDirty(project, filePath); }