changeset 638: |
6c0e4a44c082 |
parent: |
c40d2a41d7ce
|
child: |
926d95e5fdc7 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sat, 07 Sep 2024 22:34:12 -0400 |
permissions: |
-rw-r--r-- |
description: |
dblocks |
1 ;;; std/path.lisp --- Standard Path Library 8 (deftype wild-pathname () 9 "A pathname with wild components." 10 '(and pathname (satisfies wild-pathname-p))) 12 (deftype non-wild-pathname () 13 "A pathname without wild components." 14 '(or directory-pathname 15 (and pathname (not (satisfies wild-pathname-p))))) 17 (deftype absolute-pathname () 18 '(and pathname (satisfies uiop:absolute-pathname-p))) 20 (deftype relative-pathname () 21 '(and pathname (satisfies uiop:relative-pathname-p))) 23 (deftype directory-pathname () 24 '(and pathname (satisfies uiop:directory-pathname-p))) 26 (deftype absolute-directory-pathname () 27 '(and absolute-pathname directory-pathname)) 29 (deftype file-pathname () 30 '(and pathname (satisfies uiop:file-pathname-p))) 32 ;; logical-pathname is defined in CL. 34 (defconstant +pathsep+ 35 #+windows #\; #+unix #\: 36 "Path separator for this OS.") 38 (defconstant +wildfile+ (make-pathname :name :wild :type :wild :version :wild)) 40 ;; from UIOP:ADD-PATHNAME-SUFFIX 41 (defun set-pathname-suffix (path suffix &rest keys) 42 (apply 'make-pathname :name (concatenate 'string (pathname-name path) suffix) 45 (defvar *tmp-suffix* "-tmp") 47 ;; based on UIOP:TMPIZE-PATHNAME 48 (defun tmpize-pathname (path) 49 "Return a new pathname based on PATH and *TMP-SUFFIX* with a gensym'd integer 51 (set-pathname-suffix path (symbol-name 52 (gensym *tmp-suffix*))))