How do I go from VirtualFile.getPath() back to a VirtualFile?

Is it possible to go from VirtualFile.getPath() back to a VirtualFile?  If so, how do you do this?

1 comment
Comment actions Permalink

In general this is not possible, because the path does not include the protocol and thus does not identify the virtual file system that the file came from. If you know that the file is from the local file system, you can use LocalFileSystem.findFileByPath().

0

Please sign in to leave a comment.