Function: ange-ftp-get-file-entry

ange-ftp-get-file-entry is a byte-compiled function defined in ange-ftp.el.gz.

Signature

(ange-ftp-get-file-entry NAME)

Documentation

Given NAME, return the given file entry.

The entry will be either t for a directory, nil for a normal file, or a string for a symlink. If the file isn't in the hashtable, this also returns nil.

Source Code

;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-get-file-entry (name)
  "Given NAME, return the given file entry.
The entry will be either t for a directory, nil for a normal file,
or a string for a symlink.  If the file isn't in the hashtable,
this also returns nil."
  (let* ((name (directory-file-name name))
	 (dir (file-name-directory name))
	 (ent (gethash dir ange-ftp-files-hashtable))
	 (file (ange-ftp-get-file-part name)))
    (if ent
	(gethash file ent)
      (or (and (ange-ftp-allow-child-lookup dir file)
	       (setq ent (ange-ftp-get-files name t))
	       (gethash "." ent))
	  ;; i.e. it's a directory by child lookup
	  (and (setq ent (ange-ftp-get-files dir t))
	       (gethash file ent))))))