What path does JetBrains suggest for storing plugin-generated files that need to be displayed to users?

We have a report that is displayed to the user as HTML, so we generate an HTML file dynamically and open it in the browser. Does JetBrains recommend a specific path for storing such files for our plugin?

Currently, we are using:

String pluginPath = PathManager.getPluginsPath();

Is this the correct approach?

No, please do not use getPluginsPath() it is only for plugin binaries/distributions. You may use PathManager.getTempDir() for some temporary files though

@yuriy.artamonov , Just to confirm, it’s PathManager.getTempPath(), right? I don’t see PathManager.getTempDir().

When I use PathManager.getTempPath(), it generates files under
.../Library/Caches/JetBrains/IntelliJIdea2025.3/tmp. Is that correct?

Yes, PathManager.getTempDir() is probably a recent version in master with Path result, PathManager.getTempPath() does the same

1 Like

Thank you for confirming.