简体   繁体   中英

Adobe Air Global Application Data

Does anyone know of a "Global" Application data for Adobe Air?

File.applicationStorageDirectory stores within the users area?

But we need the application to store information for the whole computer.

Something such as Windows: C:\\ProgramData or AllUsers but there doesn't seem to be an official way to use these areas. (Trying to keep this as Standard as possible)

But there doesn't seem to be a File.allUsersApplicationStorage or File.globalApplicationData anything.

Now I know I could do something such as below for Windows Vista/7

var _path:String = File.applicationDirectory.nativePath;
// _np: C:\Program Files (x86)\ProgName\
_path = _path.substr(0, _np.indexOf(File.separator) + 1);
// _np: C:\
var _file = new File(_path).resolvePath("ProgramData/ProgName");

but I do not know what to do for WinXP, MacOS or Linux.

Any help would be welcome.

Couldn't you just use File.applicationDirectory ? (Or rather, a subdirectory of it.) That would store your information in the application directory, and would be accessible from all users.

It might not be ideal, but it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM