Server IP : 111.118.215.189 / Your IP : 18.118.164.125 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:18 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/find-cmd.el ;;; in Emacs version 24.3.1 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@267 Holds details of each of the find options. The car of each alist is the name. The cdr is minimum args, the function used to join many occurrences of the argument together, and whether or not to leave quotes off the string (non-nil means the string will be quoted). (defconst find-constituents '((and . find-and) (not . find-not) (or . find-or) (a . find-and) (n . find-not) (o . find-or) (prune . find-prune) (L 0) (P 0) (H 0) (amin 1) (anewer 1) (atime 1) (cmin 1) (cnewer 1) (ctime 1) (empty 0) (false 0) (fstype 1) (gid 1) (group 1) (ilname 1) (iname 1) (inum 1) (iwholename 1) (iregex 1) (links 1) (lname 1) (mmin 1) (mtime 1) (name 1) (newer 1) (nouser 0) (nogroup 0) (path 1) (perm 0) (regex 1) (wholename 1) (size 1) (true 0) (type 1) (uid 1) (used 1) (user 1) (xtype nil) (depth 0) (maxdepth 1) (mindepth 1) (mount 0) (noleaf 0) (xdev 0) (ignore_readdir_race 0) (noignore_readdir_race 0) (delete 0) (print0 0) (printf 1) (fprintf 2) (print 0) (fprint0 1) (fprint 1) (ls 0) (fls 1) (prune 0) (quit 0) (exec 1 find-command t) (ok 1 find-command t) (execdir 1 find-command t) (okdir 1 find-command t)) (#$ . 552)) #@348 Initiate the building of a find command. For example: (find-cmd '(prune (name ".svn" ".git" ".CVS")) '(and (or (name "*.pl" "*.pm" "*.t") (mtime "+1")) (fstype "nfs" "ufs")))) `default-directory' is used as the initial search path. The result is a string that should be ready for the command line. (defalias 'find-cmd #[(&rest subfinds) "\302\303\304!!\305 A\203 \306\307 \310#\202 \307 @!R\207" [default-directory subfinds "find " shell-quote-argument expand-file-name " " mapconcat find-to-string ""] 7 (#$ . 1679)]) #@129 And FORMs together, so: (and (mtime "+1") (name "something")) will produce: find . \( -mtime '+1' -and -name 'something' \) (defalias 'find-and #[(form) "G\301W\203\f \302@!\207\303\304\302\305#\306Q\207" [form 2 find-to-string "\\( " mapconcat "-and " "\\) "] 5 (#$ . 2257)]) #@126 Or FORMs together, so: (or (mtime "+1") (name "something")) will produce: find . \( -mtime '+1' -or -name 'something' \) (defalias 'find-or #[(form) "G\301W\203\f \302@!\207\303\304\302\305#\306Q\207" [form 2 find-to-string "\\( " mapconcat "-or " "\\) "] 5 (#$ . 2548)]) #@269 Or FORMs together and prefix with a -not, so: (not (mtime "+1") (name "something")) will produce: -not \( -mtime '+1' -or -name 'something' \) If you wanted the FORMs -and(ed) together instead then this would suffice: (not (and (mtime "+1") (name "something"))) (defalias 'find-not #[(form) "\301\302\303\304\"!P\207" [form "-not " find-or mapcar find-to-string] 5 (#$ . 2834)]) #@233 -or together FORMs postfix '-prune' and then -or that with a -true, so: (prune (name ".svn" ".git")) (name "*.pm") will produce (unwrapped): \( \( \( -name '.svn' -or -name '.git' \) / -prune -or -true \) -and -name '*.pm' \) (defalias 'find-prune #[(form) "\301\211\302\303\"!\304\305!P\304\306!D!\207" [form find-or mapcar find-to-string find-generic "prune" "true"] 5 (#$ . 3227)]) #@328 Allow an arbitrary string to be used as a form. OPTION is the name of the form, OPER is the function used to either OR or AND multiple results together. ARGCOUNT is the minimum of args that OPTION can receive and ARGS are the arguments for OPTION. If DONT-QUOTE is non-nil, arguments are quoted for passing them to the shell. (defalias 'find-generic #[(option &optional oper argcount args dont-quote) "\247\203 GW\203 \304\305\n#\210\206 \306 \203* G\203* \307\310 \"!\202. \311\n\312Q)\207" [argcount args option oper error "'%s' needs at least %d arguments" find-or mapcar #[(x) "\303 \203 \304\n\304Q\202 \304\305\n!\304QQ\207" [option dont-quote x "-" " " shell-quote-argument] 5] "-" " "] 4 (#$ . 3626)]) #@121 For each item in FORM add a terminating semi-colon and turn them into valid switches. The result is -and(ed) together. (defalias 'find-command #[(form) "\301\302\303\"!\207" [form find-and mapcar #[(x) "\301!\302P\207" [x find-to-string "\\; "] 2]] 4 (#$ . 4358)]) #@54 Parse FORM to produce a set of valid find arguments. (defalias 'find-to-string #[(form) ";\203 \207:\205W \306@ \"A\2119\203% \307\n!\203% \nA!\202V \n:\203Q \310@!\n@\n\211A@)\n\211AA)@ \311\312\n A\f%!,\202V \313\314@\")\207" [form find-constituents option x dont-quote oper assoc fboundp symbol-name find-to-string find-generic error "Sorry I don't know how to handle '%s'" argcnt] 8 (#$ . 4632)]) (provide 'find-cmd)