Sunday, March 9, 2008

Google Gears API: ResourceStore Module

In this post you will find code snippet for ResourceStore of LocalServer Module.

function localserver()
{
var localserver = google.gears.factory.create('beta.localserver', '1.0');
var store = localserver.createStore('mystore');
store = localserver.openStore('mystore');
var files=['/images/myimage.gif']
var captureId=store.capture(files,callback);
}
function callback()
{
alert('files are captured');
}


Ensure that you have the gears_init.js file to use above methods. For other methods refer:

http://code.google.com/apis/gears/api_localserver.html
http://code.google.com/apis/gears/api_localserver.html#ResourceStore

No comments: