perry-mitchell / webdav-fs

Node fs wrapper for WebDAV
MIT License
94 stars 21 forks source link

Added rmdir function for compatable with fs.rmdir #50

Closed meefik closed 7 years ago

meefik commented 7 years ago

Added rmdir function as clone of unlink function. Function fs.unlink unsupported delete of directory, this fix for better compatibility with fs module.

perry-mitchell commented 7 years ago

Thanks @meefik. This is definitely a wise addition. I think in the next major version might have to validate targets before deletion if both unlink and rmdir are to be used in different ways (files vs directories). A true fs module would differentiate between files and directories, whereas this library currently does not. Need to consider whether or not it's worthwhile making it 2 requests instead of 1.

perry-mitchell commented 7 years ago

Thanks @meefik