Skip to content

Instantly share code, notes, and snippets.

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