My suggestion is to look into the File.userDirectory() AIR API here:
A possible alternative is to let the user specify where their Documents folder is, using the File.browseForDirectory() API, possibly prepopulated with your expected value.
Second alternative is to use the $userlibraryfolder in the manifest instead of $userhomefolder/Documents.
Hope that helps,
Thanks Joe, the API documentsDirectory works fine, the problem is while installing with Extension manager; will look at changing to $userlibraryfolder in the manifest.
It works fine in Mac but not in some Pc's.
Why don't you just write that file yourself the first time the extension is launched?
The file is included in the bundle as a zip file, this zip must be placed in the Documents folder and the extension unzips it. The other way is to download the file the first time, I will include this as an option if placing it in Documents by the extension manager fails.
It's a large zip file with many resources needed for the extension, I tried to add them as single files but signature also fails if many files are included, therefore I had to add it as a zip file into the hybrid package.
Downloading is an option.
You can also embed the file in the extension itself. The downside to doing so is that if it's big, it'll inflate the size of your extension. If that's a concern, you can create a separate extension in the same bundle whose sole purpose is writing the file.
I thought about this but not sure how the extension will remain after adding 300Mb and probably obfuscation would also be a problem. Better handle it as a separate or downloadable file.
I have the feeling that extensions are oriented towards small applications or tools, once a lot of files and processes are involved it becomes a bit complicated.
Wow. I did not realize you were talking about 300 MB…
Downloading it is probably the way to go.