Function: url-dav-delete-directory
url-dav-delete-directory is a byte-compiled function defined in
url-dav.el.gz.
Signature
(url-dav-delete-directory URL &optional RECURSIVE LOCK-TOKEN)
Documentation
Delete the WebDAV collection URL.
If optional second argument RECURSIVE is non-nil, then delete all files in the collection as well.
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-dav.el.gz
(defun url-dav-delete-directory (url &optional recursive lock-token)
"Delete the WebDAV collection URL.
If optional second argument RECURSIVE is non-nil, then delete all
files in the collection as well."
(let ((status nil)
(props nil))
(setq props (url-dav-delete-something
url lock-token
(setq props (url-dav-get-properties url '(DAV:getcontenttype) 1))
(if (and (not recursive)
(/= (length props) 1))
(signal 'file-error (list "Removing directory"
"Directory not empty" url)))))
(mapc (lambda (result)
(setq status (plist-get (cdr result) 'DAV:status))
(if (not (url-dav-http-success-p status))
(signal 'file-error (list "Removing directory"
"Error removing"
(car result) status))))
props))
nil)