lib/Ext/device/filesystem/HTML5.js
function(config) {
        if (!config.success) {
            Ext.Logger.error('Ext.device.filesystem#requestFileSystem: You must specify a `success` callback.');
            return null;
        }

        var me = this;
        var successCallback = function(fs) {
            var fileSystem = Ext.create('Ext.device.filesystem.FileSystem', fs);
            config.success.call(config.scope || me, fileSystem);
        };

        window.requestFileSystem(
            config.type,
            config.size,
            successCallback,
            config.failure || Ext.emptyFn
        );
    }
function(config) {
        if (!config.success) {
            Ext.Logger.error('Ext.device.filesystem#requestFileSystem: You must specify a `success` callback.');
            return null;
        }

        var me = this;
        var successCallback = function(fs) {
            var fileSystem = Ext.create('Ext.device.filesystem.FileSystem', fs);
            config.success.call(config.scope || me, fileSystem);
        };

        window.requestFileSystem(
            config.type,
            config.size,
            successCallback,
            config.failure || Ext.emptyFn
        );
    }
Requests a {@link Ext.device.filesystem.FileSystem} instance.

var me = this;
var fs = Ext.create("Ext.device.FileSystem", {});
fs.requestFileSystem({
type: window.PERSISTENT,
size: 1024 * 1024,
success: function(fileSystem) {
me.fs = fileSystem;
},
failure: function(err) {
console.log("FileSystem Failure: " + err.code);
}
});

@param {Object} config
The object which contains the following config options:

@param {Number} config.type
window.TEMPORARY (0) or window.PERSISTENT (1)

@param {Number} config.size
Storage space, in Bytes, needed by the application

@param {Function} config.success This is required.
The callback to be called when the file system has been successfully created.

@param {Ext.device.filesystem.FileSystem} config.success.fileSystem
The created file system.

@param {Function} config.failure This is optional.
The callback to be called when an error occurred.

@param {Object} config.failure.error
The occurred error.

@param {Object} config.scope
The scope object