Merge from mainline.
[bpt/emacs.git] / lisp / eshell / esh-util.el
index 7c21e2e..1a4c5e1 100644 (file)
@@ -701,8 +701,11 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
        (forward-line)))
     entry))
 
-(defun eshell-file-attributes (file)
-  "Return the attributes of FILE, playing tricks if it's over ange-ftp."
+(defun eshell-file-attributes (file &optional id-format)
+  "Return the attributes of FILE, playing tricks if it's over ange-ftp.
+The optional argument ID-FORMAT specifies the preferred uid and
+gid format.  Valid values are 'string and 'integer, defaulting to
+'integer.  See `file-attributes'."
   (let* ((file (expand-file-name file))
         entry)
     (if (string-equal (file-remote-p file 'method) "ftp")
@@ -723,7 +726,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
                      (setq entry (cdr fentry))
                    (setq entry nil)))))
          entry)
-      (file-attributes file))))
+      (file-attributes file id-format))))
 
 (defalias 'eshell-copy-tree 'copy-tree)