Skip navigation
Currently Being Moderated

Is there a way to create a new directory or file in application install directory programatically

Dec 17, 2008 10:30 PM

Hi to all,
Is there a way to create a new directory or file in application install directory programatically.
I want a xml file to be created with in the application install directory programatically(not the application storage directory)

I have used the following code snippet:

var file:File = new File();
file = File.applicationDirectory;
file = file.resolvePath("assets");
if(!file.exists)
{
file.createDirectory()
}


I am thrown an exception when using this .....Security Exception
 
Replies
  • Currently Being Moderated
    Dec 17, 2008 11:15 PM   in reply to BhaskerChari
    It is not allowed to write to the App. directory.

    You should write it to applicationStorageDirectory or some other places.

    -ted
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points