examples/phonegap1/plugins/cordova-plugin-file/www/blackberry10/resolveLocalFileSystemURI.js
function resolve(success, fail, path, fsType, sandbox, options, size) {
    options = options || { create: false };
    size = size || info.MAX_SIZE;
    if (size > info.MAX_SIZE) {
        //bb10 does not respect quota; fail at unreasonably large size
        fail(FileError.QUOTA_EXCEEDED_ERR);
    } else if (path.indexOf(':') > -1) {
        //files with : character are not valid in Cordova apps 
        fail(FileError.ENCODING_ERR);
    } else {
        requestAnimationFrame(function () {
            cordova.exec(function () {
                requestAnimationFrame(function () {
                    resolveNative(success, fail, path, fsType, options, size);
                });
            }, fail, 'File', 'setSandbox', [sandbox], false);
        });
    }
}
function resolve(success, fail, path, fsType, sandbox, options, size) {
    options = options || { create: false };
    size = size || info.MAX_SIZE;
    if (size > info.MAX_SIZE) {
        //bb10 does not respect quota; fail at unreasonably large size
        fail(FileError.QUOTA_EXCEEDED_ERR);
    } else if (path.indexOf(':') > -1) {
        //files with : character are not valid in Cordova apps 
        fail(FileError.ENCODING_ERR);
    } else {
        requestAnimationFrame(function () {
            cordova.exec(function () {
                requestAnimationFrame(function () {
                    resolveNative(success, fail, path, fsType, options, size);
                });
            }, fail, 'File', 'setSandbox', [sandbox], false);
        });
    }
}
function resolve ( success , fail , path , fsType , sandbox , options , size ) { options = options || { create : false } ; size = size || info . MAX_SIZE ; if ( size > info . MAX_SIZE ) { //bb10 does not respect quota; fail at unreasonably large size fail ( FileError . QUOTA_EXCEEDED_ERR ) ; } else if ( path . indexOf ( ':' ) > - 1 ) { //files with : character are not valid in Cordova apps  fail ( FileError . ENCODING_ERR ) ; } else { requestAnimationFrame ( function ( ) { cordova . exec ( function ( ) { requestAnimationFrame ( function ( ) { resolveNative ( success , fail , path , fsType , options , size ) ; } ) ; } , fail , 'File' , 'setSandbox' , [ sandbox ] , false ) ; } ) ; } }
validate parameters and set sandbox
validate parameters and set sandbox