Access new created file Follow
I'm working on a plugin for my PHPStorm. Works like a charm so far. But sadly, I have a little hung here.
I'm starting an external process which creates a file in the project directory. After this, I want to open the desired file in the editor.
final VirtualFile theThestFile = LocalFileSystem.getInstance().findFileByPath(testFilePath);
does not find the file, as it returns null. When the file exists (when it can be seen in the project toolwindow), it loads the file.
I'm opening the file with
My thought is, that I need to tell PHPStorm to read the directories for new files, so it can open the new project file. Is that correct? The question here is: How?
If this is not my issue, please help me to find a solution. Thanks
Please sign in to leave a comment.
I fixed it with using
refreshAndFindFileByIoFile did the trick.