Closed tansaku closed 5 years ago
But perhaps the following would work without having to modify the existing code?
let mkdirPromise = new Promise((resolve, reject) => {
webDavClient.mkdir('/temp' function(error){
if(error){
reject(error.message)
else {
resolve('Successfully created directory')
}
}
})
});
Hi @tansaku - You're probably looking for this library (also made by me). webdav-fs
actually uses that library internally, and it returns promises. webdav-fs
is designed to wrap it in an fs-like adapter.
I'll close this issue for now but we reopen if you feel that there's something else.
apologies if there's an obvious work around for this, but I notice all the functions are using promises internally, but are expecting callbacks.
Would it make sense to make the callbacks optional and have all the functions return promises to make chaining easier?