Function: tramp-adb-handle-directory-files-and-attributes
tramp-adb-handle-directory-files-and-attributes is a byte-compiled
function defined in tramp-adb.el.gz.
Signature
(tramp-adb-handle-directory-files-and-attributes DIRECTORY &optional FULL MATCH NOSORT ID-FORMAT COUNT)
Documentation
Like directory-files-and-attributes for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-adb.el.gz
(defun tramp-adb-handle-directory-files-and-attributes
(directory &optional full match nosort id-format count)
"Like `directory-files-and-attributes' for Tramp files."
(tramp-skeleton-directory-files-and-attributes
directory full match nosort id-format count
(with-current-buffer (tramp-get-buffer v)
(save-restriction
(when (tramp-adb-do-ls v "-a -l" localname)
;; We insert also filename/. and filename/.., because "ls"
;; doesn't on some file systems, like "sdcard".
(goto-char (point-max))
(unless (search-backward-regexp (rx "." eol) nil t)
(narrow-to-region (point-max) (point-max))
(when (tramp-adb-do-ls
v "-d -a -l"
(file-name-concat localname ".")
(file-name-concat localname ".."))
(replace-regexp-in-region
(rx
(literal (file-name-unquote (file-name-as-directory localname))))
"" (point-min))))))
(tramp-adb-sh-fix-ls-output)
(tramp-do-parse-file-attributes-with-ls v))))