Help to start with a custom VFS plugin
We are trying to create a plugin for PyCharm to integrate with our proprietary platfrom which has a layed model to store source files in a database.
Can someone help to understand APIs involved here:
- I guess we need to implement a custom VFS. From samples I see it's still not clear what abstractions are involved. It looks most implementations are readonly. How does IDE communicates saves to VFS?
- What is the best way to integrate our custom VFS in IDE given it's not such another additional protocol but the main root for source files? I mean, by default when a new project is created, IDE asks for a location on disk for the root directory. Is it possible (and how) to register a custom protocol tied to our custom VFS, which can we used instead of a file path when a new project is created?
Any hints will be helpful?
Thanks a lot,
Dmitry
Please sign in to leave a comment.
Hi Dmitry,
1. Writing to a custom VFS is performed through calls to VirtualFile.getOutputStream().
2. As far as I know this is not currently possible. You'll need to provide a custom implementation for a new project wizard, or (as an easier to implement but somewhat less nice to use option) an action that will move the contents of a project from the regular file system into your VFS and reconfigure the project accordingly.