%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/url/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/url/url-dav.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\300\304!\210\300\305!\207" [require xml url-util url-handlers url-http parse-time] 2)
#@33 List of supported DAV versions.
(defvar url-dav-supported-protocols '(1 2) (#$ . 546))
#@73 Return a list of the elements occurring in both of the lists L1 and L2.
(defalias 'url-intersection #[(l1 l2) "\204\207\303\n\203&\n@\235\203\n\211A\242	B\202\n\211A\210\202	\237)\207" [l2 result l1 nil] 2 (#$ . 639)])
#@90 Return WebDAV protocol version supported by URL.
Returns nil if WebDAV is not supported.
(defalias 'url-dav-supported-p #[(url) "\302\303\304	!\305\"\"\207" [url-dav-supported-protocols url url-intersection plist-get url-http-options dav] 5 (#$ . 880)])
#@46 Return the text data from the XML node NODE.
(defalias 'url-dav-node-text #[(node) "\301\302\211AA\262\303#\207" [node mapconcat #[(txt) ";\203\207\301\207" [txt ""] 1] " "] 4 (#$ . 1141)])
(defconst url-dav-datatype-attribute 'urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/dt)
(defalias 'url-dav-process-integer-property #[(node) "\301\302\303!!!\207" [node truncate string-to-number url-dav-node-text] 4])
(defalias 'url-dav-process-number-property #[(node) "\301\302!!\207" [node string-to-number url-dav-node-text] 3])
(defalias 'url-dav-process-date-property #[(node) "\303!\304	!\211\203\305\n!\202\306\307\310\211@\262	$\210\n*\207" [node date-string time url-dav-node-text parse-iso8601-time-string encode-time url-debug dav "Unable to decode date (%S) (%s)"] 6])
(defalias 'url-dav-process-boolean-property #[(node) "\301\302!!\303U?\207" [node string-to-number url-dav-node-text 0] 3])
(defalias 'url-dav-process-uri-property #[(node) "\301\302!!\207" [node url-generic-parse-url url-dav-node-text] 3])
#@45 Find a function to parse the XML node NODE.
(defalias 'url-dav-find-parser #[(node) "\211@\262\302N\206,\303\304\305\211@\262\"!\306	!\204 \307\202*\310\211@\262\302	#\210	)\207" [node fn dav-parser intern format "url-dav-process-%s" fboundp url-dav-node-text put] 5 (#$ . 2180)])
(defalias 'url-dav-dispatch-node '(macro . #[(node) "\301\302DE\207" [node funcall url-dav-find-parser] 3]))
(defalias 'url-dav-process-DAV:prop #[(node) "\211AA\262\306\211\211\211\211\204\307\310!\210
\203}
@\311\211A@\262\236\243\206-\312!\306\f\313\267\202Z\314!\202l\315!\202l\316!\202l\317!\202l\320!\202l\f\321=\204f\322\323\324\f#\210\325!!\326\211@\262\n#
A\211\204-\207" [node handler-func value props node-type children nil error "No child nodes in DAV:prop" intern "unknown" #s(hash-table size 11 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (date 55 dateTime 55 dateTime\.rfc1123 55 dateTime\.tz 55 dateTime\.iso8601 55 dateTime\.iso8601tz 55 int 62 float 69 number 69 boolean 76 uri 83)) url-dav-process-date-property url-dav-process-integer-property url-dav-process-number-property url-dav-process-boolean-property url-dav-process-uri-property unknown url-debug dav "Unknown data type in url-dav-process-prop: %s" url-dav-find-parser plist-put url-dav-datatype-attribute] 6])
(defalias 'url-dav-process-DAV:supportedlock #[(node) "\211AA\262\305\211\211\211\203c\f@;\204\\\f@\211@\262\306=\203\\\307\f@\211AA\262\236\310\f@\211AA\262\236\n\203\\	\203\\\n\211AA\262@\211@\262	\211AA\262@\211@\262\211\nBB\fA\211\204,\207" [node type scope results children nil DAV:lockentry DAV:lockscope DAV:locktype] 5])
(defalias 'url-dav-process-subnode-property #[(node) "\301\302\303\304\211AA\262\"\"\207" [node delq nil mapcar car-safe] 6])
(byte-code "\300\301\302\"\210\300\303\304\"\210\300\305\304\"\210\300\306\304\"\210\300\307\302\"\210\300\310\311\"\210\300\312\311\"\210\300\313\314\"\210\300\315\314\"\207" [defalias url-dav-process-DAV:depth url-dav-process-integer-property url-dav-process-DAV:resourcetype url-dav-process-subnode-property url-dav-process-DAV:locktype url-dav-process-DAV:lockscope url-dav-process-DAV:getcontentlength url-dav-process-DAV:getlastmodified url-dav-process-date-property url-dav-process-DAV:creationdate url-dav-process-DAV:iscollection url-dav-process-boolean-property url-dav-process-DAV:ishidden] 3)
(defalias 'url-dav-process-DAV:locktoken #[(node) "\301\302\303\304\211AA\262\"\"\207" [node delq nil mapcar #[(n) ";\203\207\301!!\207" [n url-dav-find-parser] 2]] 6])
(defalias 'url-dav-process-DAV:owner #[(node) "\301\302\303\304\211AA\262\"\"\207" [node delq nil mapcar #[(n) ";\203\207\301!!\207" [n url-dav-find-parser] 2]] 6])
(defalias 'url-dav-process-DAV:activelock #[(node) "\211AA\262\303\211\203+\n@<\203$\n@\211@\262\304\n@!\n@!B	B\nA\211\204
	*\207" [node results children nil url-dav-find-parser] 4])
(defalias 'url-dav-process-DAV:lockdiscovery #[(node) "\211AA\262\303\211\203/\n@;\204(\n@\211@\262\304=\203(\305\n@!\n@!	B\nA\211\204
	*\207" [node results children nil DAV:activelock url-dav-find-parser] 3])
(defalias 'url-dav-process-DAV:status #[(node) "\302!\303\304	\"\203\305\306\307	\"!\202\310)\207" [node status url-dav-node-text string-match "\\`[ 
	\n]*HTTP/[0-9.]+ \\([0-9]+\\)" string-to-number match-string 1 500] 4])
(defalias 'url-dav-process-DAV:propstat #[(node) "\211AA\262\304\211\211\204\305\306!\210\307\310\236!\310\236!\307\311\236!\311\236!\312\n\311	#\211+\207" [node status props children nil error "No child nodes in DAV:propstat" url-dav-find-parser DAV:prop DAV:status plist-put] 5])
(defalias 'url-dav-process-DAV:response #[(node) "\211AA\262\304\211\211\204\305\306!\210\307\236\310\236\211\204#\305\311!\210\n\204+\305\312!\210\313\n!\n!\313	!	!\211\n+B\207" [node href propstat children nil error "No child nodes in DAV:response" DAV:propstat DAV:href "No href in DAV:response" "No propstat in DAV:response" url-dav-find-parser] 4])
(defalias 'url-dav-process-DAV:multistatus #[(node) "\211AA\262\303\211\203\304\n@!\n@!	B\nA\211\204
	*\207" [node results children nil url-dav-find-parser] 3])
#@154 Parse a WebDAV response from BUFFER, interpreting it relative to URL.

The buffer must have been retrieved by HTTP or HTTPS and contain an
XML document.
(defalias 'url-dav-process-response #[(buffer url) "\306\211\n\203>\307\216r\nq\210b\210\310`d\311#\210\212\312\313\306\314#\203'\315\316!\210\202)\f
\203=\317\320
\"\203=\321`d\306\211\322%*	@\211@\262\323=\203S\324	@!	@!\202r\325\326\327#\210\324	@!	@!\330\331#)BC*\207" [overall-status tree buffer url-http-end-of-headers url-http-response-status url-http-content-type nil #[nil "\301!\207" [buffer kill-buffer] 2] indent-rigidly -1000 re-search-forward "
?\n" t replace-match "" string-match "\\`\\(text\\|application\\)/xml" xml-parse-region symbol-qnames DAV:multistatus url-dav-find-parser url-debug dav "Got back singleton response for URL(%S)" plist-put DAV:status url properties] 6 (#$ . 6455)])
#@673 Perform WebDAV operation METHOD on URL.  Return the parsed responses.
Automatically creates an XML request body if TAG is non-nil.
BODY is the XML document fragment to be enclosed by <TAG></TAG>.

DEPTH is how deep the request should propagate.  Default is 0, meaning
it should apply only to URL.  A negative number means to use
`Infinity' for the depth.  Not all WebDAV servers support this depth
though.

HEADERS is an assoc list of extra headers to send in the request.

NAMESPACES is an assoc list of (NAMESPACE . EXPANSION), and these are
added to the <TAG> element.  The DAV=DAV: namespace is automatically
added to this list, so most requests can just pass in nil.
(defalias 'url-dav-request #[(url method tag body &optional depth headers namespaces) "\206\306\211\306W\203\307\202\310!\311\312	\"\204 \313	B\314B\315\nBB\f\205E\316\317!\320\321\322	\323#\324\325\317!\324\260	\326\327!\"+\207" [depth namespaces headers url-request-extra-headers method url-request-method 0 "Infinity" int-to-string assoc "DAV" ("DAV" . "DAV:") "Depth" ("Content-type" . "text/xml") "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<" symbol-name " " mapconcat #[(ns) "\301@\302A\303\260\207" [ns "xmlns:" "='" "'"] 5] "\n    " ">\n" "</" url-dav-process-response url-retrieve-synchronously tag body url-request-data url] 10 (#$ . 7349)])
#@218 Return properties for URL, up to DEPTH levels deep.

Returns an assoc list, where the key is the filename (possibly a full
URI), and the value is a standard property list of DAV property
names (ie: DAV:resourcetype).
(defalias 'url-dav-get-properties #[(url &optional attributes depth namespaces) "\304\305\306	\203\307\310	\311#\202\312\n\313&\207" [url attributes depth namespaces url-dav-request "PROPFIND" DAV:propfind mapconcat #[(attr) "\301\302!\303Q\207" [attr "<DAV:prop><" symbol-name "/></DAV:prop>"] 3] "\n  " "  <DAV:allprop/>" nil] 8 (#$ . 8717)])
#@67 Return whether STATUS was the result of a successful DAV request.
(defalias 'url-dav-http-success-p #[(status) "\206\301\302\245\303U\207" [status 500 100 2] 2 (#$ . 9293)])
(byte-code "\300\301\302\303#\300\207" [function-put url-dav-http-success-p compiler-macro url-dav-http-success-p--inliner] 4)
(defalias 'url-dav-http-success-p--inliner #[(inline--form status) "\210\3022\303\304\305	\306E\307E\310E0\207" [inline--form status inline--just-use = / or 500 100 2] 5])
#@333 URL used as contact information when creating locks in DAV.
This will be used as the contents of the DAV:owner/DAV:href tag to
identify the owner of a LOCK when requesting it.  This will be shown
to other users when the DAV:lockdiscovery property is requested, so
make sure you are comfortable with it leaking to the outside world.
(defvar url-dav-lock-identifier (concat "mailto:" user-mail-address) (#$ . 9779))
#@362 Request a lock on URL.  If EXCLUSIVE is non-nil, get an exclusive lock.
Optional 3rd argument DEPTH says how deep the lock should go, default is 0
(lock only the resource and none of its children).

Returns a cons-cell of (SUCCESSFUL-RESULTS . FAILURE-RESULTS).
SUCCESSFUL-RESULTS is a list of (URL STATUS locktoken).
FAILURE-RESULTS is a list of (URL STATUS).
(defalias 'url-dav-lock-resource #[(url exclusive &optional depth) "\203\306\202	\307\310\311	\312\260\313\211\313\211\313\211\314\315\316\n\317&\320!>\204=\321!\203\202\211A\242\322\f\211A\242\"\323\f\324\"\206Y\325\211\206`\325\326\245\327U\203u\330EB\202=DB\202=.B\207" [exclusive url-dav-lock-identifier body response result child-url "<DAV:exclusive/>" "<DAV:shared/>" "  <DAV:lockscope>" "</DAV:lockscope>\n  <DAV:locktype> <DAV:write/> </DAV:locktype>\n  <DAV:owner>\n    <DAV:href>" "</DAV:href>\n  </DAV:owner>\n" nil url-dav-request "LOCK" DAV:lockinfo (("Timeout" . "Infinite")) type-of url-generic-parse-url url-expand-file-name plist-get DAV:status 500 100 2 "huh" child-status failures successes url depth cl-struct-url-tags] 8 (#$ . 10200)])
#@50 Return an assoc list of all active locks on URL.
(defalias 'url-dav-active-locks #[(url &optional depth) "\306\307	#\310\211\211\211\211\311!>\204\312!\203\270\211A\242\211\211A\242\310\313
\314\"\206<\315\316\245\317U\203\250\313
\320\"\211\203\250
\203\250\321
@\236\203\240\321
@\236A\322
@\236A\211\310\211\203\237@\310\211\203\225@BBA\211\204*A\211\204o,
\211A\210\202L\203\323\f\"B\nB\202\n.\207" [url depth results child-results child-url child url-dav-get-properties (DAV:lockdiscovery) nil type-of url-generic-parse-url plist-get DAV:status 500 100 2 DAV:lockdiscovery DAV:locktoken DAV:owner url-expand-file-name properties response cl-struct-url-tags owners tokens token --dolist-tail-- owner] 7 (#$ . 11393)])
#@101 Release the lock on URL represented by LOCK-TOKEN.
Returns t if the lock was successfully released.
(defalias 'url-dav-unlock-resource #[(url lock-token) "\306\307\310QBC\311\312\313\f!\312
\203*\314\216r
q\210\206#\315\316\245\317U*-\207" [lock-token url-request-extra-headers url-request-method url-request-data url buffer "Lock-Token" "<" ">" "UNLOCK" nil url-retrieve-synchronously #[nil "\301!\207" [buffer kill-buffer] 2] 500 100 2 result url-http-response-status] 4 (#$ . 12207)])
(defalias 'url-dav-file-attributes-mode-string #[(properties) "\306\307\310\"\311\312\"\311\313\"\314\232\315\311\316\">\317\320$\n\2033$\321\322I\210$\323\322I\210$\324\322I\210\203=$\325\326I\210\f\203S$\327\330I\210$\331\330I\210$\332\330I\210
\203\231
@
A	@\211%\333=\203\216	A\211&\334\267\202\203$\335\336I\210\202\212$\337\336I\210\202\212\340\341\342	A#\210)\202\225\340\341\343	@#\210)\202S$.\207" [properties lock readable directory-p executable-p supported-locks make-string 10 45 plist-get DAV:supportedlock http://apache\.org/dav/props/executable "T" DAV:collection DAV:resourcetype t nil 1 114 4 7 0 100 3 120 6 9 DAV:write #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (DAV:shared 113 DAV:exclusive 122)) 5 119 2 url-debug dav "Unrecognized DAV:lockscope (%S)" "Unrecognized DAV:locktype (%S)" modes #1=#:val #2=#:val] 8])
(defalias 'url-dav-file-attributes #[(url &optional id-format) "\303!@A\211\203B\304	\305\"\206\306\307\245\310U\203B\311\304	\312\">\205#\313\314\315\211\316\304	\317\"\304	\317\"\304	\320\"\2067\315\321	!\316\211\211\257\f\202F\322\n\")\207" [url properties id-format url-dav-get-properties plist-get DAV:status 500 100 2 DAV:collection DAV:resourcetype t 1 0 nil DAV:getlastmodified DAV:getcontentlength url-dav-file-attributes-mode-string url-http-head-file-attributes] 13])
#@99 Save OBJ as URL using WebDAV.
URL must be a fully qualified URL.
OBJ may be a buffer or a string.
(defalias 'url-dav-save-resource #[(url obj &optional content-type lock-token) "\306\211\211\307\310!\203rq\210\311 )\202 ;\203\202 \312\313!\2034\314\315\316QBB\317\206;\320BB\321!\211\203Z\322\216r
q\210\206T\323\324\245\325U*\f-\207" [obj url-request-data url-request-method url-request-extra-headers result buffer nil "PUT" bufferp buffer-string error "Invalid object to url-dav-save-resource" "If" "(<" ">)" "Content-type" "application/octet-stream" url-retrieve-synchronously #[nil "\301!\207" [buffer kill-buffer] 2] 500 100 2 lock-token content-type url url-http-response-status] 7 (#$ . 14118)])
#@134 Delete the WebDAV collection URL.
If optional second argument RECURSIVE is non-nil, then delete all
files in the collection as well.
(defalias 'url-dav-delete-directory #[(url &optional recursive lock-token) "\305\211\211\306\n\307\310#\204G\310U\204\311\312\313\314\nE\"\210\315\n\316\305\211\317\f\2050\320\321\f\322QBC&\323\324\"\210+\305\207" [props status url recursive lock-token nil url-dav-get-properties (DAV:getcontenttype) 1 signal file-error "Removing directory" "Directory not empty" url-dav-request "DELETE" -1 "If" "(<" ">)" mapc #[(result) "\302A\303\"\211\206\304\305\245\306U?\205\307\310\311\312@	F\"\207" [result status plist-get DAV:status 500 100 2 signal file-error "Removing directory" "Error removing"] 7]] 10 (#$ . 14864)])
#@24 Delete file named URL.
(defalias 'url-dav-delete-file #[(url &optional lock-token) "\304\211\305\n!\306	@A\307\"\310=\203\311\312\313\314\nE\"\210\315\n\316\304\211\317\205,\320\321\322QBC&\323\324	\"\210*\304\207" [status props url lock-token nil url-dav-get-properties plist-get DAV:resourcetype DAV:collection signal file-error "Removing old name" "Is a collection" url-dav-request "DELETE" -1 "If" "(<" ">)" mapc #[(result) "\302A\303\"\211\206\304\305\245\306U?\205\307\310\311\312@	F\"\207" [result status plist-get DAV:status 500 100 2 signal file-error "Removing old name" "Error removing"] 7]] 10 (#$ . 15641)])
#@391 Return a list of names of files in URL.
There are three optional arguments:
If FULL is non-nil, return absolute URLs.  Otherwise return names
 that are relative to the specified URL.
If MATCH is non-nil, mention only file names that match the regexp MATCH.
If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
 NOSORT is useful if you plan to sort the result yourself.
(defalias 'url-dav-directory-files #[(url &optional full match nosort files-only) "\306\307\310#\311\211\211\312!\211G\310U\203%\313!\204%\314\315\316\317E\"\210
\203\202
\211A\242\211\211A\242\320\321\"\322=\203C\204%\323\f	\"\204U\324\325\f!G\"\326\327\f\"\203b\324\f\330\331#\203o\326\f\"\203%\f\332\230\204%\f\230\204%\f\nB\202% \203\213\n\202\217\333\n\334\"-\207" [url parsed-url files child-props child-url properties url-dav-get-properties (DAV:resourcetype) 1 nil url-generic-parse-url url-dav-file-directory-p signal file-error "Opening directory" "Not a directory" plist-get DAV:resourcetype DAV:collection url-expand-file-name substring url-unhex-string string-match "/$" 0 -1 "" sort string-lessp files-only full match nosort] 7 (#$ . 16286)])
#@51 Return t if URL names an existing DAV collection.
(defalias 'url-dav-file-directory-p #[(url) "\302\303\"@A\304\305	\306\">\205\307)\207" [url properties url-dav-get-properties (DAV:resourcetype) DAV:collection plist-get DAV:resourcetype t] 4 (#$ . 17482)])
#@59 Create the directory DIR and any nonexistent parent dirs.
(defalias 'url-dav-make-directory #[(url &optional parents) "\306\307\306\310!\306\f\203J\311\216r\fq\210\312\313\"\203#\314\202I\312\315\"\204I\312\316\"\204I\312\317\"\204I\312\320\"\204I\312\321\"\210*
-\207" [url-request-extra-headers url-request-method url-request-data url buffer result nil "MKCOL" url-retrieve-synchronously #[nil "\301!\207" [buffer kill-buffer] 2] eql 201 t 403 405 409 415 507 url-http-response-status] 3 (#$ . 17750)])
(defalias 'url-dav-rename-file #[(oldname newname &optional overwrite) "\306	\"\203\306\n\"\204\307\310\311	\nE\"\210\312\211\312\313	!\314\n!\211\203E\203>\247\203E\315\316\317\n\"!\204E\307\320\321\nD\"\210\203N\322B\323\nBB\324	\325\312\211\203b\326\202c\327&\330\331\f\"\210-\332\207" [url-handler-regexp oldname newname headers props status string-match signal file-error "Cannot rename between different URL backends" nil url-dav-file-directory-p url-http-file-exists-p yes-or-no-p format "File %s already exists; rename to it anyway? " file-already-exists "File already exists" ("Overwrite" . "T") "Destination" url-dav-request "MOVE" -1 0 mapc #[(result) "\304A\305\"\211\206\306\307\245\310U?\205\311\312\313\n	F\"\207" [result status oldname newname plist-get DAV:status 500 100 2 signal file-error "Renaming"] 7] t directory-p exists-p overwrite] 8])
#@115 Return a list of all completions of file name FILE in URL.
These are all file names in URL which begin with FILE.
(defalias 'url-dav-file-name-all-completions #[(file url) "\302\303\304	\305Q#\207" [url file url-dav-directory-files nil "^" ".*"] 6 (#$ . 19193)])
#@231 Complete file name FILE in URL.
Returns the longest string common to all file names in URL
that start with FILE.
If there is only one and FILE matches it exactly, returns t.
Returns nil if URL contains no name starting with FILE.
(defalias 'url-dav-file-name-completion #[(file url) "\306	\"\307\211\204\307\202\212G\310U\203!@\230\203!\311\202\212\312\313\"G\311\307\211\203\202@GW\203\202\314\315@\316T#P\307\307\211\203n@\317
\"\204e\311A\211\204V*\f\203z\307\211\2023T\2021\315@\316#,*\207" [file url result matches failed regexp url-dav-file-name-all-completions nil 1 t sort #[(a b) "G	GV\207" [a b] 2] "^" substring 0 string-match searching n potential --dolist-tail--] 6 (#$ . 19464)])
(defalias 'url-dav-register-handler #[(op) "\301\302\303\304\305\"!#\207" [op put url-file-handlers intern-soft format "url-dav-%s"] 7])
(mapc 'url-dav-register-handler nil)
(defalias 'url-dav-vc-registered #[(url) "\301\302\"\205\303\304!\305\"\205\306\307\305#\210\310\207" [url string-match "\\`https?" plist-get url-http-options dav vc-file-setprop vc-backend t] 4])
(provide 'url-dav)

Zerion Mini Shell 1.0