views:

262

answers:

2

hi, how to know the folder as write permission in air application..in my application i am saving txt file in folder,so that i need to test that folder as write permission...

var file:File = File.desktopDirectory.resolvePath("TxtFolder/DataFile.txt");

i need to check "TxtFolder" has write permission...? before saving the file(DataFile.txt)..how can i do it in flex Air as3

Thanks In Advance...

A: 

You can handle ioError event which FileReference dispatches when you don't have permissions to write into directory.

zdmytriv
A: 

Hello.

You can write to a file with AIR only if the file is under "applicationStorageDirectory". This is the only folder that has write permision.

If some know more please correct me.


Online Timesheet Software - TiMeister

Adrian Pirvulescu
You can write anywhere the user has permission to write. Across the network, desktop, c:\temp, etc...
Joel Hooks
@ JOEL HOOKS: Can you please try to save a file to "Anywhere the user has permissions". In case you do please let me know what magic have you done for it because I receive a nice IOError. Also please provide me a working sample code.
Adrian Pirvulescu