How to put\save files into your application directory? (adobe air)

actionscript-3, air, file, filesystems, mxml

Solution

It's not recomended but it is possible. Construct your File reference like this:

var pathToFile:String = File.applicationDirectory.resolvePath('file.txt').nativePath;
var someFile:File = new File(pathToFile);

Problem

How to put\save files into your application directory? (adobe air) (code example, please)

Original source