Variable: tramp-stat-directory-files-and-attributes
tramp-stat-directory-files-and-attributes is a variable defined in
tramp-sh.el.gz.
Value
"cd \"$1\" && echo \"(\"; (%l -a | tr '\\n\\r' '\\000\\000' | xargs -0 %s -c '(/////%%n///// (/////%%N/////) %%h (/////%%U///// . %%u) (/////%%G///// . %%g) %%X %%Y %%Z %%s /////%%A///// t %%i -1)' -- %n | sed -e 's/\"/\\\\\"/g' -e 's/\\/\\/\\/\\/\\//\"/g'); echo \")\""
Documentation
Shell function implementing directory-files-and-attributes as Lisp
readable output.
Format specifiers are replaced by tramp-expand-script, percent
characters need to be doubled.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defconst tramp-stat-directory-files-and-attributes
(format
(concat
;; We must care about file names with spaces, or starting with
;; "-"; this would confuse xargs. "ls -aQ" might be a solution,
;; but it does not work on all remote systems. Therefore, we use
;; \000 as file separator. `tramp-sh--quoting-style-options' do
;; not work for file names with spaces piped to "xargs".
;; Apostrophes in the stat output are masked as
;; `tramp-stat-marker', in order to make a proper shell escape of
;; them in file names.
"cd \"$1\" && echo \"(\"; (%%l -a | tr '\\n\\r' '\\000\\000' |"
" xargs -0 %%s -c"
" '(%s%%%%n%s (%s%%%%N%s) %%%%h (%s%%%%U%s . %%%%u) (%s%%%%G%s . %%%%g) %%%%X %%%%Y %%%%Z %%%%s %s%%%%A%s t %%%%i -1)'"
" -- %%n | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\"")
tramp-stat-marker tramp-stat-marker ; %n
tramp-stat-marker tramp-stat-marker ; %N
tramp-stat-marker tramp-stat-marker ; %U
tramp-stat-marker tramp-stat-marker ; %G
tramp-stat-marker tramp-stat-marker ; %A
tramp-stat-quoted-marker)
"Shell function implementing `directory-files-and-attributes' as Lisp
`read'able output.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")