How to use the cordova-plugin-file.FileProxy.resolveLocalFileSystemURI function in cordova-plugin-file

To help you get started, we’ve selected a few cordova-plugin-file examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / cordova-plugin-file-transfer / src / windows / FileTransferProxy.js View on Github external
// Update TransferOperation object with new state, delete promise property
                    // since it is not actual anymore
                    var currentDownloadOp = fileTransferOps[downloadId];
                    if (currentDownloadOp) {
                        currentDownloadOp.state = FileTransferOperation.DONE;
                        currentDownloadOp.promise = null;
                    }

                    var nativeURI = storageFile.path.replace(appData.localFolder.path, 'ms-appdata:///local')
                        .replace(appData.temporaryFolder.path, 'ms-appdata:///temp')
                        .replace('\\', '/');

                    // Passing null as error callback here because downloaded file should exist in any case
                    // otherwise the error callback will be hit during file creation in another place
                    FileProxy.resolveLocalFileSystemURI(successCallback, null, [nativeURI]);
                }, function(error) {
github Aricwithana / DOMLauncher2 / DOMLauncher / cordova / plugins / cordova-plugin-file-transfer / src / windows / FileTransferProxy.js View on Github external
// Update TransferOperation object with new state, delete promise property
                    // since it is not actual anymore
                    var currentDownloadOp = fileTransferOps[downloadId];
                    if (currentDownloadOp) {
                        currentDownloadOp.state = FileTransferOperation.DONE;
                        currentDownloadOp.promise = null;
                    }

                    var nativeURI = storageFile.path.replace(appData.localFolder.path, 'ms-appdata:///local')
                        .replace(appData.temporaryFolder.path, 'ms-appdata:///temp')
                        .replace(/\\/g, '/');

                    // Passing null as error callback here because downloaded file should exist in any case
                    // otherwise the error callback will be hit during file creation in another place
                    FileProxy.resolveLocalFileSystemURI(successCallback, null, [nativeURI]);
                }, function(error) {
github AitonGoldman / PapaScoringSoftware / 2_0_attic / front / plugins / cordova-plugin-file-transfer / src / windows / FileTransferProxy.js View on Github external
storageFile.renameAsync(fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function () {
                        var nativeURI = storageFile.path.replace(appData.localFolder.path, 'ms-appdata:///local')
                        .replace(appData.temporaryFolder.path, 'ms-appdata:///temp')
                        .replace(/\\/g, '/');

                        // Passing null as error callback here because downloaded file should exist in any case
                        // otherwise the error callback will be hit during file creation in another place
                        FileProxy.resolveLocalFileSystemURI(successCallback, null, [nativeURI]);
                    }, function(error) {
                        errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error));
github apache / cordova-plugin-file-transfer / src / windows / FileTransferProxy.js View on Github external
storageFile.renameAsync(fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done(function () {
                        var nativeURI = storageFile.path.replace(appData.localFolder.path, 'ms-appdata:///local')
                        .replace(appData.temporaryFolder.path, 'ms-appdata:///temp')
                        .replace(/\\/g, '/');

                        // Passing null as error callback here because downloaded file should exist in any case
                        // otherwise the error callback will be hit during file creation in another place
                        FileProxy.resolveLocalFileSystemURI(successCallback, null, [nativeURI]);
                    }, function(error) {
                        errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error));