简体   繁体   English

Adobe Air全球应用程序数据

[英]Adobe Air Global Application Data

Does anyone know of a "Global" Application data for Adobe Air? 有人知道Adobe Air的“全球”应用程序数据吗?

File.applicationStorageDirectory stores within the users area? File.applicationStorageDirectory存储在用户区域内?

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. Windows之类的东西:C:\\ ProgramData或AllUsers,但是似乎没有使用这些区域的官方方法。 (Trying to keep this as Standard as possible) (尝试将此保持为标准)

But there doesn't seem to be a File.allUsersApplicationStorage or File.globalApplicationData anything. 但是似乎没有File.allUsersApplicationStorageFile.globalApplicationData anything.

Now I know I could do something such as below for Windows Vista/7 现在我知道我可以为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. 但我不知道该如何处理WinXP,MacOS或Linux。

Any help would be welcome. 任何帮助都将受到欢迎。

Couldn't you just use File.applicationDirectory ? 您不能只使用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. 这可能不是理想的,但是可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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