Mercurial > emacs
comparison lisp/url/url-http.el @ 73022:aafdfc34b06a
(url-http-head-file-attributes): Add device "info".
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 20 Sep 2006 17:35:13 +0000 |
parents | 210a878f1395 |
children | 2d470bed887d |
comparison
equal
deleted
inserted
replaced
73021:23ae8f38f090 | 73022:aafdfc34b06a |
---|---|
1149 | 1149 |
1150 ;;;###autoload | 1150 ;;;###autoload |
1151 (defalias 'url-http-file-readable-p 'url-http-file-exists-p) | 1151 (defalias 'url-http-file-readable-p 'url-http-file-exists-p) |
1152 | 1152 |
1153 (defun url-http-head-file-attributes (url &optional id-format) | 1153 (defun url-http-head-file-attributes (url &optional id-format) |
1154 (let ((buffer (url-http-head url)) | 1154 (let ((buffer (url-http-head url))) |
1155 (attributes nil)) | |
1156 (when buffer | 1155 (when buffer |
1157 (setq attributes (make-list 11 nil)) | 1156 (prog1 |
1158 (setf (nth 1 attributes) 1) ; Number of links to file | 1157 (list |
1159 (setf (nth 2 attributes) 0) ; file uid | 1158 nil ;dir / link / normal file |
1160 (setf (nth 3 attributes) 0) ; file gid | 1159 1 ;number of links to file. |
1161 (setf (nth 7 attributes) ; file size | 1160 0 0 ;uid ; gid |
1162 (url-http-symbol-value-in-buffer 'url-http-content-length | 1161 nil nil nil ;atime ; mtime ; ctime |
1163 buffer -1)) | 1162 (url-http-symbol-value-in-buffer 'url-http-content-length |
1164 (setf (nth 8 attributes) (eval-when-compile (make-string 10 ?-))) | 1163 buffer -1) |
1165 (kill-buffer buffer)) | 1164 (eval-when-compile (make-string 10 ?-)) |
1166 attributes)) | 1165 nil nil nil) ;whether gid would change ; inode ; device. |
1166 (kill-buffer buffer))))) | |
1167 | 1167 |
1168 ;;;###autoload | 1168 ;;;###autoload |
1169 (defun url-http-file-attributes (url &optional id-format) | 1169 (defun url-http-file-attributes (url &optional id-format) |
1170 (if (url-dav-supported-p url) | 1170 (if (url-dav-supported-p url) |
1171 (url-dav-file-attributes url id-format) | 1171 (url-dav-file-attributes url id-format) |