Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created September 24, 2012 01:46
Show Gist options
  • Select an option

  • Save aaronpowell/3773776 to your computer and use it in GitHub Desktop.

Select an option

Save aaronpowell/3773776 to your computer and use it in GitHub Desktop.
WinJS StorageFolder file exists
Windows.Storage.StorageFolder.prototype.fileExistsAsync = function(fileName) {
var folder = this;
return WinJS.Promise(function (complete, error) {
folder.getFileAsync(fileName).then(function() {
complete();
}, function() {
error();
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment