//>>built define(["dojo","dijit","dojox","dojo/require!dojox/storage/manager,dojox/storage/Provider"],function(g,m,f){g.provide("dojox.storage.AirFileStorageProvider");g.require("dojox.storage.manager");g.require("dojox.storage.Provider");g.isAIR&&function(){if(!e)var e={};e.File=window.runtime.flash.filesystem.File;e.FileStream=window.runtime.flash.filesystem.FileStream;e.FileMode=window.runtime.flash.filesystem.FileMode;g.declare("dojox.storage.AirFileStorageProvider",[f.storage.Provider],{initialized:!1, _storagePath:"__DOJO_STORAGE/",initialize:function(){this.initialized=!1;try{var a=e.File.applicationStorageDirectory.resolvePath(this._storagePath);a.exists||a.createDirectory();this.initialized=!0}catch(b){console.debug("dojox.storage.AirFileStorageProvider.initialize:",b)}f.storage.manager.loaded()},isAvailable:function(){return!0},put:function(a,b,c,d){if(0==this.isValidKey(a))throw Error("Invalid key given: "+a);d=d||this.DEFAULT_NAMESPACE;if(0==this.isValidKey(d))throw Error("Invalid namespace given: "+ d);try{this.remove(a,d);var h=e.File.applicationStorageDirectory.resolvePath(this._storagePath+d);h.exists||h.createDirectory();var g=h.resolvePath(a),f=new e.FileStream;f.open(g,e.FileMode.WRITE);f.writeObject(b);f.close()}catch(l){console.debug("dojox.storage.AirFileStorageProvider.put:",l);c(this.FAILED,a,l.toString(),d);return}c&&c(this.SUCCESS,a,null,d)},get:function(a,b){if(0==this.isValidKey(a))throw Error("Invalid key given: "+a);b=b||this.DEFAULT_NAMESPACE;var c=null;a=e.File.applicationStorageDirectory.resolvePath(this._storagePath+ b+"/"+a);a.exists&&!a.isDirectory&&(b=new e.FileStream,b.open(a,e.FileMode.READ),c=b.readObject(),b.close());return c},getNamespaces:function(){var a=[this.DEFAULT_NAMESPACE],b=e.File.applicationStorageDirectory.resolvePath(this._storagePath).getDirectoryListing(),c;for(c=0;c