Changeset 8765


Ignore:
Timestamp:
Mar 13, 2008, 6:33:29 AM (12 years ago)
Author:
gb
Message:

In DIRECTORY, ignore emacs lockfiles by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/pathnames.lisp

    r8343 r8765  
    308308                            (all t)           ;; include Unix dot files (other than dot and dot dot)
    309309                            (directory-pathnames t) ;; return directories as directory-pathname-p's.
     310                            (include-emacs-lockfiles nil) ;; inculde .#foo
    310311                            test              ;; Only return pathnames matching test
    311312                            (follow-links t)) ;; return truename's of matching files.
     
    320321                     :directory-pathnames directory-pathnames
    321322                     :test test
     323                     :include-emacs-lockfiles include-emacs-lockfiles
    322324                     :follow-links follow-links))
    323325         (path (full-pathname (merge-pathnames path) :no-error nil))
     
    378380        (follow-links (getf keys :follow-links))
    379381        (all (getf keys :all))
     382        (include-emacs-lockfiles (getf keys :include-emacs-lockfiles))
    380383        (result ())
    381384        sub dir-list ans)
     
    390393        (while (setq sub (%read-dir dirent))
    391394          (when (and (or all (neq (%schar sub 0) #\.))
     395                     (or include-emacs-lockfiles
     396                         (and (>= (length sub) 2)
     397                              (not (string= sub ".#" :end1 2))))
    392398                     (not (string= sub "."))
    393399                     (not (string= sub ".."))
     
    407413    result))
    408414
    409 ; now for samson:**:*c*:**: we get samson:ccl:crap:barf: twice because
    410 ; it matches in two ways
    411 ; 1) **=ccl *c*=crap **=barf
    412 ; 2) **= nothing *c*=ccl **=crap:barf
    413 ; called to match a **
    414415(defun %all-directories (dir rest path so-far keys)
    415416  (let ((do-files nil)
Note: See TracChangeset for help on using the changeset viewer.