The Difference Of Location Storage File in air

Frans Simanjuntak picture Frans Simanjuntak · Nov 9, 2010 · Viewed 12k times · Source

I want to ask the difference between air.File.documentsDirectory.resolvePath, File.userDirectory.resolvePath, air.File.applicationDirectory.resolvePath..

Can anybody explain when does the file will be store.....

especially in windows

Answer

Chunky Chunk picture Chunky Chunk · Nov 9, 2010

AIR's applicationStorageDirectory will automatically target these locations depending on which OS the application is running:

  • Windows 7 / Vista: c:\users\USERNAME\appdata\roaming\APPLICATIONNAME

  • Windows XP: c:\Documents and Settings\USERNAME\Application Data\APPLICATIONNAME

  • Mac OS X: /Users/USERNAME/Library/Preferences/APPLICATIONNAME

  • Linux (Ubuntu): /Users/USERNAME/.appdata/

along with desktopDirectory, documentsDirectory, applicationDirectory (read-only), which, too, have their own specific locations, these are built-in conveniences that allow AIR developers to produce cross-platform applications without having to know about (or specifically code for) the file system of a target OS.