Skip to content

Instantly share code, notes, and snippets.

@cbiggins
Created May 27, 2011 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbiggins/995029 to your computer and use it in GitHub Desktop.
Save cbiggins/995029 to your computer and use it in GitHub Desktop.
function getPrefsFile() {
var prefsFile = air.File.applicationStorageDirectory.resolvePath("prefs.xml");
// Does the storage file exist?
if (!prefsFile.exists) {
// Not there, so we'll copy the blank XML file from the app dir
original = air.File.applicationDirectory.resolvePath("prefs.xml");
original.copyTo(prefsFile, true);
}
return prefsFile;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment