Where to store tmp file for IDEA Plugin


As titles says, where to store tmp files for IDEA Plugin. Let me hold an example, I'm developing an idea plugin named `TinyPNG` and I want to use `TinyPNG` to compress file user selected. Then it will generate some tmp files that user does not need at all so it's bad to store file in project work dir.

I find there is a `build` dir in most idea project. Is `dir` usually used for some plugin such as `TinyPNG` to store tmp files?

1 comment
Comment actions Permalink

You can use com.intellij.openapi.util.io.FileUtilRt#createTempDirectory(java.lang.String, java.lang.String) and its overloaded variants


Please sign in to leave a comment.