The Ti.Filesystem.createTempDirectory() method does not create the referenced directory by default on Android. It correctly returns a Ti.Filesystem.File object referencing a new directory, but the Titanium developer is forced to create it manually afterwards, which doesn't match iOS' behavior or what's implied by the method name.
Steps to reproduce:
- Build and run the below on Android.
- Notice in the log that "exists" returns false. (This is the bug.)
Android should also be changed to create the temp directory under the Ti.Filesystem.tempDirectory like iOS. Currently, Android puts the temp directory in a radically different location that Titanium does not offer a directory constant for.
You must create the directory manually like the below.