Function: shadow-same-site

shadow-same-site is a byte-compiled function defined in shadowfile.el.gz.

Signature

(shadow-same-site PATTERN FILE)

Documentation

True if the site of PATTERN and of FILE are on the same site.

PATTERN and FILE may be Tramp vectors, or remote file names. FILE may also be just a local filename.

Source Code

;; Defined in /usr/src/emacs/lisp/shadowfile.el.gz
(defun shadow-same-site (pattern file)
  "True if the site of PATTERN and of FILE are on the same site.
PATTERN and FILE may be Tramp vectors, or remote file names.
FILE may also be just a local filename."
  (let ((pattern-sup (shadow-parse-name pattern))
	(file-sup    (shadow-parse-name file)))
    (and
     (shadow-site-match
      (tramp-file-name-host pattern-sup) (tramp-file-name-host file-sup))
     (or (null (tramp-file-name-user pattern-sup))
	 (string-equal
          (tramp-file-name-user pattern-sup)
          (tramp-file-name-user file-sup))))))