Skip to content

Instantly share code, notes, and snippets.

@ridhotegar
Last active December 23, 2021 05:01
Show Gist options
  • Save ridhotegar/7fef18f6b32fcc691ef4e04da9c91c88 to your computer and use it in GitHub Desktop.
Save ridhotegar/7fef18f6b32fcc691ef4e04da9c91c88 to your computer and use it in GitHub Desktop.
function checkFolder (folder_name, found, notFound) {
document.addEventListener('deviceready', () => {
let path = cordova.file.documentsDirectory+"NoCloud/"
window.resolveLocalFileSystemURL(path, e => {
e.getDirectory(`${folder_name}`, {create: false}, found, notFound);
}, error => console.log(error))
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment