This should do it.
thank you! that's correct of cause! But that's not exactly what I need. I need a place to put autosaves. So I need an url of the folder where createTempFile() creates a file.
Hmmm... I usually create my own folder in My Documents to store autosaves and others. The code is like this:
var file:File = File.documentsDirectory.resolvePath("Spring Leaf");
but you could also create a temporary folder just like creating a temporary file:
I think I'll store autosaves in 'My documents' folder as well. thank you!
one more question: are you sure that an app can write into 'Me documents' folder?
I would avoid using the My Documents folder if you can help it. That's Windows only and would break on a Mac or Linux. Better to use ApplicationStorageDirectory and create a folder inside that for your autosaves.
Then you'd reference it like appStorage:/folderName/filename.txt