%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/url/ |
Current File : //usr/local/share/emacs/27.2/lisp/url/url-cache.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\312\313&\210\304\314\315\316\317\320\310\321\312\322& \207" [require url-parse url-util url custom-declare-variable url-cache-directory (expand-file-name "cache" url-configuration-directory) "The directory where cache files should be stored." :type directory :group url-file url-cache-expire-time 3600 "Default maximum time in seconds before cache files expire.\nUsed by the function `url-cache-expired'." :version "24.1" integer url-cache] 10) #@75 Follows the documentation of `file-writable-p', unlike `file-writable-p'. (defalias 'url-cache-file-writable-p #[(file) "\301!\205 \302!\203 \303!?\207\303\304!!\207" [file file-writable-p file-exists-p file-directory-p file-name-directory] 3 (#$ . 930)]) #@492 Makes it possible to cache data in FILE. Creates any necessary parent directories, deleting any non-directory files that would stop this. Returns nil if parent directories can not be created. If FILE already exists as a non-directory, it changes permissions of FILE or deletes FILE to make it possible to write a new version of FILE. Returns nil if this can not be done, or if FILE already exists as a directory. Otherwise, returns t, indicating that FILE can be created or overwritten. (defalias 'url-cache-prepare #[(file) "\301!\203 \302\207\303!\203 \304\207\3051 \306\307!\302\"\206 \3020\207\210\304\207" [file url-cache-file-writable-p t file-directory-p nil (error) make-directory file-name-directory] 3 (#$ . 1199)]) #@33 Store buffer BUFF in the cache. (defalias 'url-store-in-cache #[(&optional buff) "r\303\206 p!q\210\304\305\306!!\307 !\205 \310\311ed \312\313%)*\207" [buff fname coding-system-for-write get-buffer url-cache-create-filename url-view-url t url-cache-prepare binary write-region nil 5] 6 (#$ . 1942)]) #@60 Fetch URL from cache and return a buffer with the content. (defalias 'url-fetch-from-cache #[(url) "r\301\302!q\210\303\304!!\210p)\207" [url generate-new-buffer " *temp*" url-cache-extract url-cache-create-filename] 3 (#$ . 2254)]) #@111 Return non-nil if the URL is cached. The actual return value is the last modification time of the cache file. (defalias 'url-is-cached #[(url) "\303!\304 ! \205# \305 !\205# \n\211@\262\306=?\205# \n\3078\262*\207" [url fname attribs url-cache-create-filename file-attributes file-exists-p t 5] 3 (#$ . 2495)]) #@47 Return a filename in the local cache for URL. (defalias 'url-cache-create-filename-human-readable #[(url) "\205\372 \306!\307 !\n>\204 \310\311\300 D\"\210 \312H\307 !\n>\204* \310\311\300 D\"\210 \313H\314 \2065 \315\316\317\f\206<