TIL - Tempfile and Tempdir

Tempfile & Tempdir is the way to create temporary files and directories.

Itโ€™s handy in cases where you need to process a file but donโ€™t need it after you are done with the processing.

Tempfiles and Tempdirs are cleaned up automatically as soon as you loose reference to it.

You can also manually unlink a Tempfile, Which is useful in cases where you want to delete it right away.

Tempfile and Tempdir is avilable in almost all modern programming languages.

Here it is documented in Ruby and Python


Continue Reading