Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By operadev anchor Thursday, 15. May 2008, 13:17:56

File I/O API

This new API provides you with functionality needed to access data on the desktop from widgets, providing powerful hybrid web/desktop capabilities.

( Read the article )

By shadowk anchor Friday, 16. May 2008, 07:34:02

avatarGreat post, I've been waiting for file access from a widget ever since Opera introduced widgets.

By Zajec anchor Friday, 16. May 2008, 13:38:44

avatarCan sb point me, what can this be used for? We already can storage data thanks to widget mechanism in Opera. What for some widget may needs file access?

By Benjamin Joffe anchor Wednesday, 21. May 2008, 07:48:10

avatarZajec: There are many things one can do with file access, for example Grafio's SketchPad could now be made to open and save files to the filesystem, in theory one could create The Gimp as an Opera Widget!

By Luchio anchor Thursday, 22. May 2008, 18:28:37

avatarWhat are the security implications of this? Could someone theorically "steal" my wands.dat? my /etc/passwd?

Will there be a popup in Opera if a widget tries to access files?

By grafio anchor Thursday, 22. May 2008, 22:09:18

avatarAFAIK browseForDirectory() and browseForFile() methods open a file browser window and *the user* has to choose a file or directory which can be used by the widget. So widgets can't open a file without earlier permission.

Post edited Thursday, 22. May 2008, 23:17:23

By Luchio anchor Friday, 23. May 2008, 13:10:05

avatarThanks, that wasn't clear from the article.

By Luchio anchor Friday, 23. May 2008, 15:38:49

avatarNote to self: never point a widget to C:\

By motorfest anchor Monday, 26. May 2008, 14:23:49

avatarWhy does some graphic fragment can access to the file of necessities?

By fearphage anchor Tuesday, 27. May 2008, 15:19:15

avatarWould it be possible for this functionality to be ported to work with userjs somehow?

By evilopera anchor Friday, 30. May 2008, 09:54:16

avatarall super, a code is very simple and clear. Now I apply.

By limc anchor Friday, 7. November 2008, 10:49:49

avatarHello,

It seems that you managed to use the File I/O API, and maybe you could help me to do so, because I'm experiencing some strange issues while using it.
When I try the exact sample code from the article, I get "cannot convert null or undefined to Object" javascript errors when calling opera.io.filesystem.browseForDirectory( 'share', '', processDir ) or opera.io.filesystem.mountSystemDirectory('application') ... are there special lib to include ? It seems not, because it's not an "undefined variable" error that I get . No ? Could someone give me a clue to get this work ?
I'm running under Opera 9.62 under Intrepid Ibex (but I get the same errors under Opera for Win XP). (And I found no answer to the problem on search engines which I've been searching though for complete 2 days .... :/ )

Thank you in advance !

By geelpheels anchor Tuesday, 11. November 2008, 06:33:56

avatar

Originally posted by limc:

Hello,

It seems that you managed to use the File I/O API, and maybe you could help me to do so, because I'm experiencing some strange issues while using it.
When I try the exact sample code from the article, I get "cannot convert null or undefined to Object" javascript errors when calling opera.io.filesystem.browseForDirectory( 'share', '', processDir ) or opera.io.filesystem.mountSystemDirectory('application') ... are there special lib to include ? It seems not, because it's not an "undefined variable" error that I get . No ? Could someone give me a clue to get this work ?
I'm running under Opera 9.62 under Intrepid Ibex (but I get the same errors under Opera for Win XP). (And I found no answer to the problem on search engines which I've been searching though for complete 2 days .... :/ )

Thank you in advance !



I got the same problem. Who can solve it?
Thanks a lot!

By limc anchor Wednesday, 12. November 2008, 10:22:32

avatarHi

For more precisions : I tried the old 9.52 internal release dated Mai 2008 (given here http://labs.opera.com/news/2008/05/08/ ) and all is working fine. Why aren't the API in the current production version, I don't know :frown: ... )

My other issue (which has driven me tu use file I/O api) is that XMLHttpRequests on local files don't seem to work into widgets.(but it's ok when using the file:// protocol into the browser with the same documents)
Did someone manage to use this feature ?

Thanks

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom