1014 |
|
|
1015 |
(defun ange-ftp-hash-entry-exists-p (key tbl) |
(defun ange-ftp-hash-entry-exists-p (key tbl) |
1016 |
"Return whether there is an association for KEY in TABLE." |
"Return whether there is an association for KEY in TABLE." |
1017 |
(not (eq (gethash key tbl 'unknown) 'unknown))) |
(and tbl (not (eq (gethash key tbl 'unknown) 'unknown)))) |
1018 |
|
|
1019 |
(defun ange-ftp-hash-table-keys (tbl) |
(defun ange-ftp-hash-table-keys (tbl) |
1020 |
"Return a sorted list of all the active keys in TABLE, as strings." |
"Return a sorted list of all the active keys in TABLE, as strings." |
1771 |
ange-ftp-gateway-program |
ange-ftp-gateway-program |
1772 |
ange-ftp-gateway-host))) |
ange-ftp-gateway-host))) |
1773 |
(ftp (mapconcat 'identity args " "))) |
(ftp (mapconcat 'identity args " "))) |
1774 |
(process-kill-without-query proc) |
(set-process-query-on-exit-flag proc nil) |
1775 |
(set-process-sentinel proc 'ange-ftp-gwp-sentinel) |
(set-process-sentinel proc 'ange-ftp-gwp-sentinel) |
1776 |
(set-process-filter proc 'ange-ftp-gwp-filter) |
(set-process-filter proc 'ange-ftp-gwp-filter) |
1777 |
(save-excursion |
(save-excursion |
1880 |
(start-process " *nslookup*" " *nslookup*" |
(start-process " *nslookup*" " *nslookup*" |
1881 |
ange-ftp-nslookup-program host))) |
ange-ftp-nslookup-program host))) |
1882 |
(res host)) |
(res host)) |
1883 |
(process-kill-without-query proc) |
(set-process-query-on-exit-flag proc nil) |
1884 |
(save-excursion |
(save-excursion |
1885 |
(set-buffer (process-buffer proc)) |
(set-buffer (process-buffer proc)) |
1886 |
(while (memq (process-status proc) '(run open)) |
(while (memq (process-status proc) '(run open)) |
1938 |
(set-buffer (process-buffer proc)) |
(set-buffer (process-buffer proc)) |
1939 |
(goto-char (point-max)) |
(goto-char (point-max)) |
1940 |
(set-marker (process-mark proc) (point))) |
(set-marker (process-mark proc) (point))) |
1941 |
(process-kill-without-query proc) |
(set-process-query-on-exit-flag proc nil) |
1942 |
(set-process-sentinel proc 'ange-ftp-process-sentinel) |
(set-process-sentinel proc 'ange-ftp-process-sentinel) |
1943 |
(set-process-filter proc 'ange-ftp-process-filter) |
(set-process-filter proc 'ange-ftp-process-filter) |
1944 |
;; On Windows, the standard ftp client buffers its output (because |
;; On Windows, the standard ftp client buffers its output (because |
2919 |
;; error message. |
;; error message. |
2920 |
(gethash "." ent)) |
(gethash "." ent)) |
2921 |
;; Child lookup failed, so try the parent. |
;; Child lookup failed, so try the parent. |
2922 |
(let ((table (ange-ftp-get-files dir 'no-error))) |
(ange-ftp-hash-entry-exists-p |
2923 |
;; If the dir doesn't exist, don't use it as a hash table. |
file (ange-ftp-get-files dir 'no-error)))))) |
|
(and table |
|
|
(ange-ftp-hash-entry-exists-p file |
|
|
table))))))) |
|
2924 |
|
|
2925 |
(defun ange-ftp-get-file-entry (name) |
(defun ange-ftp-get-file-entry (name) |
2926 |
"Given NAME, return the given file entry. |
"Given NAME, return the given file entry. |
3371 |
(setq file (ange-ftp-expand-file-name file)) |
(setq file (ange-ftp-expand-file-name file)) |
3372 |
(if (ange-ftp-ftp-name file) |
(if (ange-ftp-ftp-name file) |
3373 |
(condition-case nil |
(condition-case nil |
3374 |
(let ((file-ent |
(let ((ent (ange-ftp-get-files (file-name-directory file)))) |
3375 |
(gethash |
(and ent |
3376 |
(ange-ftp-get-file-part file) |
(stringp (setq ent |
3377 |
(ange-ftp-get-files (file-name-directory file))))) |
(gethash (ange-ftp-get-file-part file) ent))) |
3378 |
(and (stringp file-ent) file-ent)) |
ent)) |
3379 |
;; If we can't read the parent directory, just assume |
;; If we can't read the parent directory, just assume |
3380 |
;; this file is not a symlink. |
;; this file is not a symlink. |
3381 |
;; This makes it possible to access a directory that |
;; This makes it possible to access a directory that |