# HG changeset patch # User Stefan Monnier # Date 1158773713 0 # Node ID aafdfc34b06afca084f5cdfa7b009e3208ee69bd # Parent 23ae8f38f0903e04341ca25042ec247608bc708a (url-http-head-file-attributes): Add device "info". diff -r 23ae8f38f090 -r aafdfc34b06a lisp/url/ChangeLog --- a/lisp/url/ChangeLog Wed Sep 20 17:35:01 2006 +0000 +++ b/lisp/url/ChangeLog Wed Sep 20 17:35:13 2006 +0000 @@ -1,3 +1,9 @@ +2006-09-20 Stefan Monnier + + * url-dav.el (url-dav-file-attributes): Simplify. + + * url-http.el (url-http-head-file-attributes): Add device "info". + 2006-09-18 Michael Olson * url-methods.el (url-scheme-register-proxy): Handle case where diff -r 23ae8f38f090 -r aafdfc34b06a lisp/url/url-http.el --- a/lisp/url/url-http.el Wed Sep 20 17:35:01 2006 +0000 +++ b/lisp/url/url-http.el Wed Sep 20 17:35:13 2006 +0000 @@ -1151,19 +1151,19 @@ (defalias 'url-http-file-readable-p 'url-http-file-exists-p) (defun url-http-head-file-attributes (url &optional id-format) - (let ((buffer (url-http-head url)) - (attributes nil)) + (let ((buffer (url-http-head url))) (when buffer - (setq attributes (make-list 11 nil)) - (setf (nth 1 attributes) 1) ; Number of links to file - (setf (nth 2 attributes) 0) ; file uid - (setf (nth 3 attributes) 0) ; file gid - (setf (nth 7 attributes) ; file size - (url-http-symbol-value-in-buffer 'url-http-content-length - buffer -1)) - (setf (nth 8 attributes) (eval-when-compile (make-string 10 ?-))) - (kill-buffer buffer)) - attributes)) + (prog1 + (list + nil ;dir / link / normal file + 1 ;number of links to file. + 0 0 ;uid ; gid + nil nil nil ;atime ; mtime ; ctime + (url-http-symbol-value-in-buffer 'url-http-content-length + buffer -1) + (eval-when-compile (make-string 10 ?-)) + nil nil nil) ;whether gid would change ; inode ; device. + (kill-buffer buffer))))) ;;;###autoload (defun url-http-file-attributes (url &optional id-format)