/[emacs]/emacs/lisp/url/url-dav.el
ViewVC logotype

Diff of /emacs/lisp/url/url-dav.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by lektu, Mon May 16 10:07:31 2005 UTC revision 1.8 by monnier, Fri Jun 10 22:02:23 2005 UTC
# Line 457  added to this list, so most requests can Line 457  added to this list, so most requests can
457                 "</" (symbol-name tag) ">\n"))))                 "</" (symbol-name tag) ">\n"))))
458      (url-dav-process-response (url-retrieve-synchronously url) url)))      (url-dav-process-response (url-retrieve-synchronously url) url)))
459    
 ;;;###autoload  
460  (defun url-dav-get-properties (url &optional attributes depth namespaces)  (defun url-dav-get-properties (url &optional attributes depth namespaces)
461    "Return properties for URL, up to DEPTH levels deep.    "Return properties for URL, up to DEPTH levels deep.
462    
# Line 487  identify the owner of a LOCK when reques Line 486  identify the owner of a LOCK when reques
486  to other users when the DAV:lockdiscovery property is requested, so  to other users when the DAV:lockdiscovery property is requested, so
487  make sure you are comfortable with it leaking to the outside world.")  make sure you are comfortable with it leaking to the outside world.")
488    
 ;;;###autoload  
489  (defun url-dav-lock-resource (url exclusive &optional depth)  (defun url-dav-lock-resource (url exclusive &optional depth)
490    "Request a lock on URL.  If EXCLUSIVE is non-nil, get an exclusive lock.    "Request a lock on URL.  If EXCLUSIVE is non-nil, get an exclusive lock.
491  Optional 3rd argument DEPTH says how deep the lock should go, default is 0  Optional 3rd argument DEPTH says how deep the lock should go, default is 0
# Line 528  FAILURE-RESULTS is a list of (URL STATUS Line 526  FAILURE-RESULTS is a list of (URL STATUS
526          (push (list url child-status) failures)))          (push (list url child-status) failures)))
527      (cons successes failures)))      (cons successes failures)))
528    
 ;;;###autoload  
529  (defun url-dav-active-locks (url &optional depth)  (defun url-dav-active-locks (url &optional depth)
530    "Return an assoc list of all active locks on URL."    "Return an assoc list of all active locks on URL."
531    (let ((response (url-dav-get-properties url '(DAV:lockdiscovery) depth))    (let ((response (url-dav-get-properties url '(DAV:lockdiscovery) depth))
# Line 563  FAILURE-RESULTS is a list of (URL STATUS Line 560  FAILURE-RESULTS is a list of (URL STATUS
560                  results)))                  results)))
561      results))      results))
562    
 ;;;###autoload  
563  (defun url-dav-unlock-resource (url lock-token)  (defun url-dav-unlock-resource (url lock-token)
564    "Release the lock on URL represented by LOCK-TOKEN.    "Release the lock on URL represented by LOCK-TOKEN.
565  Returns t iff the lock was successfully released."  Returns t iff the lock was successfully released."
# Line 624  Returns t iff the lock was successfully Line 620  Returns t iff the lock was successfully
620    
621  (autoload 'url-http-head-file-attributes "url-http")  (autoload 'url-http-head-file-attributes "url-http")
622    
 ;;;###autoload  
623  (defun url-dav-file-attributes (url &optional id-format)  (defun url-dav-file-attributes (url &optional id-format)
624    (let ((properties (cdar (url-dav-get-properties url)))    (let ((properties (cdar (url-dav-get-properties url)))
625          (attributes nil))          (attributes nil))
# Line 680  Returns t iff the lock was successfully Line 675  Returns t iff the lock was successfully
675        (setq attributes (url-http-head-file-attributes url id-format)))        (setq attributes (url-http-head-file-attributes url id-format)))
676      attributes))      attributes))
677    
 ;;;###autoload  
678  (defun url-dav-save-resource (url obj &optional content-type lock-token)  (defun url-dav-save-resource (url obj &optional content-type lock-token)
679    "Save OBJ as URL using WebDAV.    "Save OBJ as URL using WebDAV.
680  URL must be a fully qualified URL.  URL must be a fully qualified URL.
# Line 736  Use with care, and even then think three Line 730  Use with care, and even then think three
730                                     (concat "(<" ,lock-token ">)"))))))))                                     (concat "(<" ,lock-token ">)"))))))))
731    
732    
 ;;;###autoload  
733  (defun url-dav-delete-directory (url &optional recursive lock-token)  (defun url-dav-delete-directory (url &optional recursive lock-token)
734    "Delete the WebDAV collection URL.    "Delete the WebDAV collection URL.
735  If optional second argument RECURSIVE is non-nil, then delete all  If optional second argument RECURSIVE is non-nil, then delete all
# Line 761  files in the collection as well." Line 754  files in the collection as well."
754             props))             props))
755    nil)    nil)
756    
 ;;;###autoload  
757  (defun url-dav-delete-file (url &optional lock-token)  (defun url-dav-delete-file (url &optional lock-token)
758    "Delete file named URL."    "Delete file named URL."
759    (let ((props nil)    (let ((props nil)
# Line 781  files in the collection as well." Line 773  files in the collection as well."
773            props))            props))
774    nil)    nil)
775    
 ;;;###autoload  
776  (defun url-dav-directory-files (url &optional full match nosort files-only)  (defun url-dav-directory-files (url &optional full match nosort files-only)
777    "Return a list of names of files in DIRECTORY.    "Return a list of names of files in DIRECTORY.
778  There are three optional arguments:  There are three optional arguments:
# Line 828  If NOSORT is non-nil, the list is not so Line 819  If NOSORT is non-nil, the list is not so
819          files          files
820        (sort files 'string-lessp))))        (sort files 'string-lessp))))
821    
 ;;;###autoload  
822  (defun url-dav-file-directory-p (url)  (defun url-dav-file-directory-p (url)
823    "Return t if URL names an existing DAV collection."    "Return t if URL names an existing DAV collection."
824    (let ((properties (cdar (url-dav-get-properties url '(DAV:resourcetype)))))    (let ((properties (cdar (url-dav-get-properties url '(DAV:resourcetype)))))
825      (eq (plist-get properties 'DAV:resourcetype) 'DAV:collection)))      (eq (plist-get properties 'DAV:resourcetype) 'DAV:collection)))
826    
 ;;;###autoload  
827  (defun url-dav-make-directory (url &optional parents)  (defun url-dav-make-directory (url &optional parents)
828    "Create the directory DIR and any nonexistent parent dirs."    "Create the directory DIR and any nonexistent parent dirs."
829    (declare (special url-http-response-status))    (declare (special url-http-response-status))
# Line 864  If NOSORT is non-nil, the list is not so Line 853  If NOSORT is non-nil, the list is not so
853          (kill-buffer buffer)))          (kill-buffer buffer)))
854      result))      result))
855    
 ;;;###autoload  
856  (defun url-dav-rename-file (oldname newname &optional overwrite)  (defun url-dav-rename-file (oldname newname &optional overwrite)
857    (if (not (and (string-match url-handler-regexp oldname)    (if (not (and (string-match url-handler-regexp oldname)
858                  (string-match url-handler-regexp newname)))                  (string-match url-handler-regexp newname)))
# Line 905  If NOSORT is non-nil, the list is not so Line 893  If NOSORT is non-nil, the list is not so
893            props)            props)
894      t))      t))
895    
 ;;;###autoload  
896  (defun url-dav-file-name-all-completions (file url)  (defun url-dav-file-name-all-completions (file url)
897    "Return a list of all completions of file name FILE in directory DIRECTORY.    "Return a list of all completions of file name FILE in directory DIRECTORY.
898  These are all file names in directory DIRECTORY which begin with FILE."  These are all file names in directory DIRECTORY which begin with FILE."
899    (url-dav-directory-files url nil (concat "^" file ".*")))    (url-dav-directory-files url nil (concat "^" file ".*")))
900    
 ;;;###autoload  
901  (defun url-dav-file-name-completion (file url)  (defun url-dav-file-name-completion (file url)
902    "Complete file name FILE in directory DIRECTORY.    "Complete file name FILE in directory DIRECTORY.
903  Returns the longest string  Returns the longest string
# Line 951  Returns nil if DIR contains no name star Line 937  Returns nil if DIR contains no name star
937    (put op 'url-file-handlers (intern-soft (format "url-dav-%s" op))))    (put op 'url-file-handlers (intern-soft (format "url-dav-%s" op))))
938    
939  (mapcar 'url-dav-register-handler  (mapcar 'url-dav-register-handler
940          '(file-name-all-completions          ;; These handlers are disabled because they incorrectly presume that
941            file-name-completion          ;; the URL specifies an HTTP location and thus break FTP URLs.
942            rename-file          '(;; file-name-all-completions
943            make-directory            ;; file-name-completion
944            file-directory-p            ;; rename-file
945            directory-files            ;; make-directory
946            delete-file            ;; file-directory-p
947            delete-directory            ;; directory-files
948            file-attributes))            ;; delete-file
949              ;; delete-directory
950              ;; file-attributes
951              ))
952    
953    
954  ;;; Version Control backend cruft  ;;; Version Control backend cruft

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26