VFS documentation specifically lists "Providing a possibility to associate additional persistent data with a file in the VFS" as a feature.
However, it doesn't say how to persist the data across IDEA restarts and I didn't manage to find it by exploring the API. I thought that perhaps the data managed by putUserData
/getUserData
would be automatically persistent for VirtualFile
s, but this doesn't seem to be the case.
It looks like you need FileAttribute instead.
See the usage in LastUnchangedContentTracker for example.