I have a plugin which needs to create a temporary file. Where should I put it?
Asked
Active
Viewed 1,305 times
1 Answers
4
PathService has a getTempPath() method which will return the craft/storage/runtime/temp path by default.
Craft uses that for its temporary files and so can plugins. Just make sure youre plugin is being defensive by giving it a unique filename or create a folder with a unique name and put your files in there, etc.
Brad Bell
- 67,440
- 6
- 73
- 143
/storagefolder? I get file not found if I try to link to it. – Vadim Goncharov Sep 25 '15 at 17:48