;ELC   
;;; Compiled by aatharuv@cutter-john.mit.edu on Sun Jan  5 18:41:48 2003
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/url-cvs-20030105-src/lisp/url-file.el
;;; in Emacs version 21.1.1
;;; with bytecomp version 2.85
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`url-file.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require mailcap url-vars url-parse url-dired] 2)
#@19 Default FTP port.
(defconst url-file-default-port 21 (#$ . 770))
#@33 FTP transfers are asynchronous.
(defconst url-file-asynchronous-p t (#$ . 841))
(defalias 'url-file-expand-file-name 'url-default-expander)
#@323 Find the exact file referenced by `fname'.
This tries the common compression extensions, because things like
ange-ftp and efs are not quite smart enough to realize when a server
can do automatic decompression for them, and won't find 'foo' if
'foo.gz' exists, even though the ftp server would happily serve it up
to them.
(defalias 'url-file-find-possibly-compressed-file #[(fname &rest args) "\304\305\304	\203! \204! \306	\211A@P\211!\203 \n\202 +\207" [found compressed-extensions scratch fname nil ("" ".gz" ".z" ".Z" ".bz2") file-exists-p] 4 (#$ . 988)])
#@49 Return t iff HOST references our local machine.
(defalias 'url-file-host-is-local-p #[(host) "\302	?\206C 	\303\230\206C 	\227\304 \227\232\206C \305\306	\"\203! \302\202C \305\307\310!	\"?\205C 	\227\305\307\310!\304 \"\203@ \304 \311\211\224O\202B \304 \232)\207" [case-fold-search host t "" system-name string-match "^localhost$" regexp-quote "." 0] 4 (#$ . 1565)])
(defalias 'url-file-asynch-callback #[(x y name buff func args &optional efs) "\306\307!\204 \n\f\310\311	!8\212q\210db\210\312U\204' \313\314\"c\210\315c\210\316	!\210\317\320H!\204< \321\322\323\217\210\324\n\"*\207" [buff name func args efs size featurep ange-ftp 7 file-attributes -1 format "Content-length: %d\n" "\n" insert-file-contents-literally url-file-host-is-local-p 3 nil (delete-file name) ((error)) apply url-current-object] 3])
(defalias 'url-file-build-filename #[(url) "\306!\204\n \307!\310H\311H\312H\206$ \313H\205$ \314\315H\316\"\317H\203I \320U\204I \321\322!\203A \323\324\f#\202J \323\325\f#\202J \f\326\327H!,	\204\\ \330\f!\204l \331	\206b \332\333\334,\260\202\205 -\335>\203\203 \336\337,\"\203\203 ,\310\340O\202\205 ,.\340/	\203\263 \n\203\263 \321\322!\203\241 \341\f	\n#\210\202\263 \321\342!\204\255 \321\343!\203\263 \344\f	\n#\210\345.!\203\321 \336\323\3460\".\"\204\321 \327\323\347.0#I\210\345.!\203\373 1\203\373 \3501.\"\211/\203\373 \351/!\203\373 \352/!\203\373 /.\353.!\211..\207" [url user pass port host site vectorp url-generic-parse-url 1 2 4 8 url-scheme-get-property 0 default-port 3 21 featurep ange-ftp format "%s %d" "%s#%d" url-unhex-string 5 url-file-host-is-local-p "/" "anonymous" "@" ":" (emx ms-dos windows-nt ms-windows) string-match "^/[a-zA-Z]:/" nil ange-ftp-set-passwd efs efs-auto efs-set-passwd file-directory-p "%c$" "%s%c" expand-file-name file-exists-p file-readable-p url-file-find-possibly-compressed-file file system-type filename pos-index directory-sep-char url-directory-index-file] 7])
#@29 Handle file: and ftp: URLs.
(defalias 'url-file #[(url callback cbargs) "\306\306\306\306\307\310!\2114\204 \311\312\313!\"\210\314\3154\"\203+ 4\316\211\224O\202- 4\317\320	!!\321\3204!!\2115\322>\203F \323\202s 5\324=\203Q \325\202s 5\326=\203\\ \327\202s 5\330=\203g \331\202s 5\332=\203r \333\202s \306)\3344!\203\204 \3354!\210\2029\212\336\337!\211q\210\340\341!\203\226 \341\306!\2106\342\n\206\237 \343\344\261\210\203\255 \345\344\261\210\346\347H!\203\334 \350\351!\203\313 \352\306\2114p78&\210\2028\352\306\211\2114p78&\210\2028\3204!9\3539G\316V\205\357 \3549P!:\350\351!\203\3554\356:!\357\306\357\352:p78\257\357&\210\2027\360\361\362\"\210\3614\3634!:\363:!\357\306\316\352:p78\257\316\306&\n\210*)-\207" [buffer uncompressed-filename content-type content-encoding coding-system-for-read url nil binary url-file-build-filename error "File does not exist: %s" url-recreate-url string-match "\\.\\(gz\\|Z\\|z\\)$" 0 mailcap-extension-to-mime url-file-extension intern (\.z \.gz) "gzip" \.Z "compress" \.uue "x-uuencoded" \.hqx "x-hqx" \.bz2 "x-bzip2" file-directory-p url-find-file-dired generate-new-buffer " *url-file*" fboundp set-buffer-multibyte "Content-type: " "application/octet-stream" "\n" "Content-transfer-encoding: " url-file-host-is-local-p 3 featurep ange-ftp url-file-asynch-callback url-generate-unique-filename "%s." ange-ftp-copy-file-internal expand-file-name t autoload efs-copy-file-internal "efs" efs-ftp-path filename #1=#:G79501 url-current-object callback cbargs extension new] 14 (#$ . 3565)])
(defalias 'url-file-create-wrapper '(macro . #[(method args) "\302\303\304\305\306\"!D\307\304\305\310\"!	\305\311\"\312\313\314\315\316\315\317	\"\"BE\257E\207" [method args defalias quote intern format "url-ftp-%s" defun "url-file-%s" "FTP/FILE URL wrapper around `%s' call." (setq url (url-file-build-filename url)) and url remove &rest &optional] 15]))
(byte-code "\300\301\302\303M\210\302\"\210\300\304\305\306M\210\305\"\210\300\307\310\311M\210\310\"\210\300\312\313\314M\210\313\"\210\300\315\316\317M\210\316\"\210\300\320\321\322M\210\321\"\210\323\324!\203Q \300\325\326\327M\210\326\"\210\300\330\331\332M\210\331\"\210\202c \300\325\326\333M\210\326\"\210\300\330\331\334M\210\331\"\210\335\336!\207" [defalias url-ftp-file-exists-p url-file-file-exists-p #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-exists-p] 3 "FTP/FILE URL wrapper around `file-exists-p' call."] url-ftp-file-attributes url-file-file-attributes #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-attributes] 3 "FTP/FILE URL wrapper around `file-attributes' call."] url-ftp-file-symlink-p url-file-file-symlink-p #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-symlink-p] 3 "FTP/FILE URL wrapper around `file-symlink-p' call."] url-ftp-file-readable-p url-file-file-readable-p #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-readable-p] 3 "FTP/FILE URL wrapper around `file-readable-p' call."] url-ftp-file-writable-p url-file-file-writable-p #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-writable-p] 3 "FTP/FILE URL wrapper around `file-writable-p' call."] url-ftp-file-executable-p url-file-file-executable-p #[(url) "\301!\211\205 \302!\207" [url url-file-build-filename file-executable-p] 3 "FTP/FILE URL wrapper around `file-executable-p' call."] featurep xemacs url-ftp-directory-files url-file-directory-files #[(url &optional full match nosort files-only) "\305!\211\205 \306	\n\f%\207" [url full match nosort files-only url-file-build-filename directory-files] 7 "FTP/FILE URL wrapper around `directory-files' call."] url-ftp-file-truename url-file-file-truename #[(url &optional default) "\302!\211\205\f \303	\"\207" [url default url-file-build-filename file-truename] 4 "FTP/FILE URL wrapper around `file-truename' call."] #[(url &optional full match nosort) "\304!\211\205 \305	\n$\207" [url full match nosort url-file-build-filename directory-files] 6 "FTP/FILE URL wrapper around `directory-files' call."] #[(url &optional counter prev-dirs) "\303!\211\205 \304	\n#\207" [url counter prev-dirs url-file-build-filename file-truename] 5 "FTP/FILE URL wrapper around `file-truename' call."] provide url-file] 4)
