1 Reply Latest reply on Sep 12, 2010 2:23 PM by blacksyforce

    Creating file in My Documents

    blacksyforce Level 1

      Hy. I want to create a file in My Documents that my AIR application will use. I know it can be done, I accidentally created the file and folder on desktop and because I didn't need it then I deleted the code. Best regards !

        • 1. Re: Creating file in My Documents
          blacksyforce Level 1

          For the love of gods... I found a way. I don't get it how something so simple is so hard to find on the internet... anyway for those who are interested how to create a file here's a sample:

           

          var file:File = File.desktopDirectory.resolvePath("Files/newFile.txt");

          var stream:FileStream = new FileStream();

          stream.open(file, FileMode.WRITE);

          stream.close();