This is not a tag line!
Posts tagged gotcha
Beware of File.createTempFile
Sep 4th
By default, File.createTempFile (in Java, of course) creates a temporary file in the directory identified by the system property java.io.tmpdir. The problem is that on OS X, that directory can be quite weird. For example, on my system, it currently is:
scala> System.getProperties().getProperty("java.io.tmpdir")
res0: java.lang.String = /var/folders/ya/yaNATrKPGFu2HuSOWxSIu++++TI/-Tmp-/
Notice the ++++ in one of the directory names? Well, these little characters can later cause headaches! The reason, you ask? Simple, if that temporary file name is ever used in a URL, then those plus signs will be interpreted as spaces and whatever code is using a URL to find your temporary file will not More >

