Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when do getTempDirectory files get deleted?

In coldfusion, when do files that are uploaded using the getTempDirectory() function get deleted? I'm storing a temporary file that will eventually go in a database, but I need to run some code before I push it to my database. Once it's on the database I'll want to delete it from the temp directory. How long does it stay in the temp directory?

like image 805
ConfusedDeer Avatar asked Oct 27 '25 04:10

ConfusedDeer


1 Answers

They don't get deleted.

getTempDirectory() only returns a temp folder path for you to use (mostly from OS, unless you're running multi-instance). Neither CF nor your OS is responsible for deleting the content inside.

In Windows if you run Disk Cleanup tool, temp folder would be one of the provided selections but that's about it.

like image 89
Henry Avatar answered Oct 29 '25 06:10

Henry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!