> > |
%META:TOPICINFO{author="AlexeyEfimov" date="1108453320" format="1.0" version="1.1"}%
Get the VirtualFile? from absolute file path.
From SystemToolsPlugin sources:
public VirtualFile getVirtualFile() {
VirtualFileSystem fileSystem = LocalFileSystem.getInstance();
return fileSystem.findFileByPath(fileContext.getFile().getAbsolutePath().replace(File.separatorChar, '/'));
}
Related Topics: PluginDevelopmentHowTo, PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation,
IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins
-- AlexeyEfimov - 15 Feb 2005
%META:FORM{name="PluginDevelopmentHowToForm"}%
%META:FIELD{name="HowToQuestion" title="HowToQuestion" value="How to get VirtualFile? by absolute file path"}%
%META:FIELD{name="OpenAPI" title="OpenAPI" value="VFS"}%
%META:FIELD{name="HowToStatus" title="HowToStatus" value=" "}% |