How do I prevent the user from deleting a file that is currently being downloaded?
I am using
return WinJS.Application.local.folder.createFileAsync(localFile, Windows.Storage.CreationCollisionOption.generateUniqueName).then(function (newFile) {
var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
var operation = downloader.createDownload(uri, newFile);
To create the file. However, the file can be deleted by everybody and once the download finished it cannot write the file and raises an error.
I would have thought that the BFT API makes sure the target file cannot be tempered with while the download is ongoing.