/[cmucl]/src/code/filesys.lisp
ViewVC logotype

Contents of /src/code/filesys.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.87 - (show annotations)
Mon Aug 22 20:29:19 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2005-09
Changes since 1.86: +18 -13 lines
Add a restart to ENSURE-DIRECTORIES-EXIST to retry directory
creation.  From Eduardo Munoz, cmucl-imp, 2005/07/31.
1 ;;; -*- Log: code.log; Package: Lisp -*-
2 ;;; **********************************************************************
3 ;;; This code was written as part of the CMU Common Lisp project at
4 ;;; Carnegie Mellon University, and has been placed in the public domain.
5 ;;; If you want to use this code or any part of CMU Common Lisp, please contact
6 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
7 ;;;
8 (ext:file-comment
9 "$Header: /tiger/var/lib/cvsroots/cmucl/src/code/filesys.lisp,v 1.87 2005/08/22 20:29:19 rtoy Exp $")
10 ;;;
11 ;;; **********************************************************************
12 ;;;
13 ;;; File system interface functions. This file is pretty UNIX specific.
14 ;;;
15 ;;; Written by William Lott
16 ;;;
17 ;;; **********************************************************************
18
19 (in-package "LISP")
20
21 (export '(truename probe-file user-homedir-pathname directory
22 rename-file delete-file file-write-date file-author))
23
24 (use-package "EXTENSIONS")
25
26 (in-package "EXTENSIONS")
27 (export '(print-directory complete-file ambiguous-files default-directory
28 purge-backup-files file-writable unix-namestring))
29 (in-package "LISP")
30
31
32 ;;;; Unix pathname host support.
33
34 ;;; Unix namestrings have the following format:
35 ;;;
36 ;;; namestring := [ directory ] [ file [ type [ version ]]]
37 ;;; directory := [ "/" | search-list ] { file "/" }*
38 ;;; search-list := [^:/]*:
39 ;;; file := [^/]*
40 ;;; type := "." [^/.]*
41 ;;; version := ".*" | ".~" ([0-9]+ | "*") "~"
42 ;;;
43 ;;; Note: this grammar is ambiguous. The string foo.bar.~5~ can be parsed
44 ;;; as either just the file specified or as specifying the file, type, and
45 ;;; version. Therefore, we use the following rules when confronted with
46 ;;; an ambiguous file.type.version string:
47 ;;;
48 ;;; - If the first character is a dot, it's part of the file. It is not
49 ;;; considered a dot in the following rules.
50 ;;;
51 ;;; - If there is only one dot, it separates the file and the type.
52 ;;;
53 ;;; - If there are multiple dots and the stuff following the last dot
54 ;;; is a valid version, then that is the version and the stuff between
55 ;;; the second to last dot and the last dot is the type.
56 ;;;
57 ;;; Wildcard characters:
58 ;;;
59 ;;; If the directory, file, type components contain any of the following
60 ;;; characters, it is considered part of a wildcard pattern and has the
61 ;;; following meaning.
62 ;;;
63 ;;; ? - matches any character
64 ;;; * - matches any zero or more characters.
65 ;;; [abc] - matches any of a, b, or c.
66 ;;; {str1,str2,...,strn} - matches any of str1, str2, ..., or strn.
67 ;;;
68 ;;; Any of these special characters can be preceded by a backslash to
69 ;;; cause it to be treated as a regular character.
70 ;;;
71
72 (defun remove-backslashes (namestr start end)
73 "Remove any occurrences of \\ from the string because we've already
74 checked for whatever may have been backslashed."
75 (declare (type simple-base-string namestr)
76 (type index start end))
77 (let* ((result (make-string (- end start)))
78 (dst 0)
79 (quoted nil))
80 (do ((src start (1+ src)))
81 ((= src end))
82 (cond (quoted
83 (setf (schar result dst) (schar namestr src))
84 (setf quoted nil)
85 (incf dst))
86 (t
87 (let ((char (schar namestr src)))
88 (cond ((char= char #\\)
89 (setq quoted t))
90 (t
91 (setf (schar result dst) char)
92 (incf dst)))))))
93 (when quoted
94 (error 'namestring-parse-error
95 :complaint "Backslash in bad place."
96 :namestring namestr
97 :offset (1- end)))
98 (shrink-vector result dst)))
99
100 (defvar *ignore-wildcards* nil)
101
102 (defun maybe-make-pattern (namestr start end)
103 (declare (type simple-base-string namestr)
104 (type index start end))
105 (if *ignore-wildcards*
106 (subseq namestr start end)
107 (collect ((pattern))
108 (let ((quoted nil)
109 (any-quotes nil)
110 (last-regular-char nil)
111 (index start))
112 (flet ((flush-pending-regulars ()
113 (when last-regular-char
114 (pattern (if any-quotes
115 (remove-backslashes namestr
116 last-regular-char
117 index)
118 (subseq namestr last-regular-char index)))
119 (setf any-quotes nil)
120 (setf last-regular-char nil))))
121 (loop
122 (when (>= index end)
123 (return))
124 (let ((char (schar namestr index)))
125 (cond (quoted
126 (incf index)
127 (setf quoted nil))
128 ((char= char #\\)
129 (setf quoted t)
130 (setf any-quotes t)
131 (unless last-regular-char
132 (setf last-regular-char index))
133 (incf index))
134 ((char= char #\?)
135 (flush-pending-regulars)
136 (pattern :single-char-wild)
137 (incf index))
138 ((char= char #\*)
139 (flush-pending-regulars)
140 (pattern :multi-char-wild)
141 (incf index))
142 ((char= char #\[)
143 (flush-pending-regulars)
144 (let ((close-bracket
145 (position #\] namestr :start index :end end)))
146 (unless close-bracket
147 (error 'namestring-parse-error
148 :complaint "``['' with no corresponding ``]''"
149 :namestring namestr
150 :offset index))
151 (pattern (list :character-set
152 (subseq namestr
153 (1+ index)
154 close-bracket)))
155 (setf index (1+ close-bracket))))
156 (t
157 (unless last-regular-char
158 (setf last-regular-char index))
159 (incf index)))))
160 (flush-pending-regulars)))
161 (cond ((null (pattern))
162 "")
163 ((null (cdr (pattern)))
164 (let ((piece (first (pattern))))
165 (typecase piece
166 ((member :multi-char-wild) :wild)
167 (simple-string piece)
168 (t
169 (make-pattern (pattern))))))
170 (t
171 (make-pattern (pattern)))))))
172
173 ;;; extract-name-type-and-version -- Internal.
174 ;;;
175 (defun extract-name-type-and-version (namestr start end)
176 (declare (type simple-base-string namestr)
177 (type index start end))
178 (labels
179 ((explicit-version (namestr start end)
180 ;; Look for something like "~*~" at the end of the
181 ;; namestring, where * can be #\* or some digits. This
182 ;; denotes a version.
183 (cond ((or (< (- end start) 4)
184 (and (char/= (schar namestr (1- end)) #\~)
185 (char/= (schar namestr (1- end)) #\*)))
186 ;; No explicit version given, so return NIL to
187 ;; indicate we don't want file versions, unless
188 ;; requested in other ways.
189 (values nil end))
190 ((and (not *ignore-wildcards*)
191 (char= (schar namestr (- end 2)) #\*)
192 (char= (schar namestr (- end 3)) #\~)
193 (char= (schar namestr (- end 4)) #\.))
194 ;; Found "~*~", so it's a wild version
195 (values :wild (- end 4)))
196 (t
197 ;; Look for a version number. Start at the end, just
198 ;; before the ~ and keep looking for digits. If the
199 ;; first non-digit is ~, we have a version number, so
200 ;; get it. If not, we didn't find a version number,
201 ;; so we call it :newest
202 (do ((i (- end 2) (1- i)))
203 ((< i (+ start 1)) (values :newest end))
204 (let ((char (schar namestr i)))
205 (when (eql char #\~)
206 (return (if (char= (schar namestr (1- i)) #\.)
207 (values (parse-integer namestr :start (1+ i)
208 :end (1- end))
209 (1- i))
210 (values :newest end))))
211 (unless (char<= #\0 char #\9)
212 (return (values :newest end))))))))
213 (any-version (namestr start end)
214 ;; process end of string looking for a version candidate.
215 (multiple-value-bind (version where)
216 (explicit-version namestr start end)
217 (cond ((not (eq version :newest))
218 (values version where))
219 ((and (not *ignore-wildcards*)
220 (>= (- end 2) start)
221 (char= (schar namestr (- end 1)) #\*)
222 (char= (schar namestr (- end 2)) #\.)
223 (find #\. namestr
224 :start (min (1+ start) (- end 2))
225 :end (- end 2)))
226 (values :wild (- end 2)))
227 (t (values version where)))))
228 (any-type (namestr start end)
229 ;; Process end of string looking for a type. A leading "."
230 ;; is part of the name.
231 (let ((where (position #\. namestr
232 :start (min (1+ start) end)
233 :end end :from-end t)))
234 (when where
235 (values where end))))
236 (any-name (namestr start end)
237 (declare (ignore namestr))
238 (values start end)))
239 (multiple-value-bind (version vstart)
240 (any-version namestr start end)
241 (multiple-value-bind (tstart tend)
242 (any-type namestr start vstart)
243 (multiple-value-bind (nstart nend)
244 (any-name namestr start (or tstart vstart))
245 (values
246 (maybe-make-pattern namestr nstart nend)
247 (and tstart (maybe-make-pattern namestr (1+ tstart) tend))
248 version))))))
249
250 ;;; Take a string and return a list of cons cells that mark the char
251 ;;; separated subseq. The first value t if absolute directories location.
252 ;;;
253 (defun split-at-slashes (namestr start end)
254 (declare (type simple-base-string namestr)
255 (type index start end))
256 (let ((absolute (and (/= start end)
257 (char= (schar namestr start) #\/))))
258 (when absolute
259 (incf start))
260 ;; Next, split the remainder into slash separated chunks.
261 (collect ((pieces))
262 (loop
263 (let ((slash (position #\/ namestr :start start :end end)))
264 (pieces (cons start (or slash end)))
265 (unless slash
266 (return))
267 (setf start (1+ slash))))
268 (values absolute (pieces)))))
269
270 (defun maybe-extract-search-list (namestr start end)
271 (declare (type simple-base-string namestr)
272 (type index start end))
273 (let ((quoted nil))
274 (do ((index start (1+ index)))
275 ((= index end)
276 (values nil start))
277 (if quoted
278 (setf quoted nil)
279 (case (schar namestr index)
280 (#\\
281 (setf quoted t))
282 (#\:
283 (return (values (remove-backslashes namestr start index)
284 (1+ index)))))))))
285
286 (defun parse-unix-namestring (namestr start end)
287 (declare (type simple-base-string namestr)
288 (type index start end))
289 (multiple-value-bind
290 (absolute pieces)
291 (split-at-slashes namestr start end)
292 (let ((search-list
293 (if absolute
294 nil
295 (let ((first (car pieces)))
296 (multiple-value-bind
297 (search-list new-start)
298 (maybe-extract-search-list namestr
299 (car first) (cdr first))
300 (when search-list
301 (setf absolute t)
302 (setf (car first) new-start))
303 search-list)))))
304 (multiple-value-bind
305 (name type version)
306 (let* ((tail (car (last pieces)))
307 (tail-start (car tail))
308 (tail-end (cdr tail)))
309 (unless (= tail-start tail-end)
310 (setf pieces (butlast pieces))
311 (extract-name-type-and-version namestr tail-start tail-end)))
312 ;; PVE: Make sure there are no illegal characters in the name
313 ;; such as #\Null and #\/.
314 (when (and (stringp name)
315 (find-if #'(lambda (x)
316 (or (char= x #\Null) (char= x #\/)))
317 name))
318 (error 'parse-error))
319 ;; Now we have everything we want. So return it.
320 (values nil ; no host for unix namestrings.
321 nil ; no devices for unix namestrings.
322 (collect ((dirs))
323 (when search-list
324 (dirs (intern-search-list search-list)))
325 (dolist (piece pieces)
326 (let ((piece-start (car piece))
327 (piece-end (cdr piece)))
328 (unless (= piece-start piece-end)
329 (cond ((string= namestr ".." :start1 piece-start
330 :end1 piece-end)
331 (dirs :up))
332 ((string= namestr "**" :start1 piece-start
333 :end1 piece-end)
334 (dirs :wild-inferiors))
335 (t
336 (dirs (maybe-make-pattern namestr
337 piece-start
338 piece-end)))))))
339 (cond (absolute
340 (cons :absolute (dirs)))
341 ((dirs)
342 (cons :relative (dirs)))
343 (t
344 nil)))
345 name
346 type
347 version)))))
348
349 (defun unparse-unix-host (pathname)
350 (declare (type pathname pathname)
351 (ignore pathname))
352 ;; this host designator needs to be recognized as a physical host in
353 ;; PARSE-NAMESTRING. Until sbcl-0.7.3.x, we had "Unix" here, but
354 ;; that's a valid Logical Hostname, so that's a bad choice. -- CSR,
355 "")
356
357 (defun unparse-unix-piece (thing)
358 (etypecase thing
359 ((member :wild) "*")
360 ((member :unspecific)
361 ;; CLHS 19.2.2.2.3.1 says "That is, both nil and :unspecific
362 ;; cause the component not to appear in the namestring."
363 "")
364 (simple-string
365 (let* ((srclen (length thing))
366 (dstlen srclen))
367 (dotimes (i srclen)
368 (case (schar thing i)
369 ((#\* #\? #\[)
370 (incf dstlen))))
371 (let ((result (make-string dstlen))
372 (dst 0))
373 (dotimes (src srclen)
374 (let ((char (schar thing src)))
375 (case char
376 ((#\* #\? #\[)
377 (setf (schar result dst) #\\)
378 (incf dst)))
379 (setf (schar result dst) char)
380 (incf dst)))
381 result)))
382 (pattern
383 (collect ((strings))
384 (dolist (piece (pattern-pieces thing))
385 (etypecase piece
386 (simple-string
387 (strings piece))
388 (symbol
389 (ecase piece
390 (:multi-char-wild
391 (strings "*"))
392 (:single-char-wild
393 (strings "?"))))
394 (cons
395 (case (car piece)
396 (:character-set
397 (strings "[")
398 (strings (second piece))
399 (strings "]"))
400 (t
401 (error "Invalid pattern piece: ~S" piece))))))
402 (apply #'concatenate
403 'simple-string
404 (strings))))))
405
406 (defun unparse-unix-directory-list (directory)
407 (declare (type list directory))
408 (collect ((pieces))
409 (when directory
410 (ecase (pop directory)
411 (:absolute
412 (cond ((search-list-p (car directory))
413 (pieces (search-list-name (pop directory)))
414 (pieces ":"))
415 (t
416 (pieces "/"))))
417 (:relative
418 ;; Nothing special.
419 ))
420 (dolist (dir directory)
421 (typecase dir
422 ((member :up)
423 (pieces "../"))
424 ((member :back)
425 (error ":BACK cannot be represented in namestrings."))
426 ((member :wild-inferiors)
427 (pieces "**/"))
428 ((or simple-string pattern (eql :wild))
429 (pieces (unparse-unix-piece dir))
430 (pieces "/"))
431 (t
432 (error "Invalid directory component: ~S" dir)))))
433 (apply #'concatenate 'simple-string (pieces))))
434
435 (defun unparse-unix-directory (pathname)
436 (declare (type pathname pathname))
437 (unparse-unix-directory-list (%pathname-directory pathname)))
438
439 (defun unparse-unix-file (pathname)
440 (declare (type pathname pathname))
441 (collect ((strings))
442 (let* ((name (%pathname-name pathname))
443 (type (%pathname-type pathname))
444 (type-supplied (not (or (null type) (eq type :unspecific))))
445 (logical-p (logical-pathname-p pathname))
446 (version (%pathname-version pathname))
447 (version-supplied (not (or (null version)
448 (member version '(:newest
449 :unspecific))))))
450 (when name
451 (strings (unparse-unix-piece name)))
452 (when type-supplied
453 (unless name
454 (error "Cannot specify the type without a file: ~S" pathname))
455 (strings ".")
456 (strings (unparse-unix-piece type)))
457 #+(or)
458 (when (and version (not name))
459 ;; We don't want version without a name, because when we try
460 ;; to read #p".~*~" back, the name is "", not NIL.
461 (error "Cannot specify a version without a file: ~S" pathname))
462 (when version-supplied
463 (strings (if (eq version :wild)
464 (if logical-p ".*" ".~*~")
465 (format nil (if logical-p ".~D" ".~~~D~~")
466 version)))))
467 (and (strings) (apply #'concatenate 'simple-string (strings)))))
468
469 (defun unparse-unix-namestring (pathname)
470 (declare (type pathname pathname))
471 (concatenate 'simple-string
472 (unparse-unix-directory pathname)
473 (unparse-unix-file pathname)))
474
475 (defun unparse-unix-enough (pathname defaults)
476 (declare (type pathname pathname defaults))
477 (flet ((lose ()
478 (error "~S cannot be represented relative to ~S"
479 pathname defaults)))
480 (collect ((strings))
481 (let* ((pathname-directory (%pathname-directory pathname))
482 (defaults-directory (%pathname-directory defaults))
483 (prefix-len (length defaults-directory))
484 (result-dir
485 (cond ((null pathname-directory)
486 ;; No directory, so relative to default.
487 (list :relative))
488 ((eq (first pathname-directory) :relative)
489 ;; Relative directory so relative to default.
490 pathname-directory)
491 ((and (> prefix-len 1)
492 (>= (length pathname-directory) prefix-len)
493 (compare-component (subseq pathname-directory
494 0 prefix-len)
495 defaults-directory))
496 ;; Pathname starts with a prefix of default. So just
497 ;; use a relative directory from then on out.
498 (cons :relative (nthcdr prefix-len pathname-directory)))
499 ((eq (car pathname-directory) :absolute)
500 ;; We are an absolute pathname, so we can just use it.
501 pathname-directory)
502 (t
503 ;; We are a relative directory. So we lose.
504 (lose)))))
505 (strings (unparse-unix-directory-list result-dir)))
506 (let* ((pathname-version (%pathname-version pathname))
507 (version-needed (and pathname-version
508 (not (eq pathname-version :newest))))
509 (pathname-type (%pathname-type pathname))
510 (type-needed (or version-needed
511 (and pathname-type
512 (not (eq pathname-type :unspecific)))))
513 (pathname-name (%pathname-name pathname))
514 (name-needed (or type-needed
515 (and pathname-name
516 (not (compare-component pathname-name
517 (%pathname-name
518 defaults)))))))
519 (when name-needed
520 (unless pathname-name (lose))
521 (strings (unparse-unix-piece pathname-name)))
522 (when type-needed
523 (when (or (null pathname-type) (eq pathname-type :unspecific))
524 (lose))
525 (strings ".")
526 (strings (unparse-unix-piece pathname-type)))
527 (when version-needed
528 (typecase pathname-version
529 ((member :wild)
530 (strings ".~*~"))
531 (integer
532 (strings (format nil ".~~~D~~" pathname-version)))
533 (t
534 (lose)))))
535 (apply #'concatenate 'simple-string (strings)))))
536
537
538 (defstruct (unix-host
539 (:include host
540 (:parse #'parse-unix-namestring)
541 (:unparse #'unparse-unix-namestring)
542 (:unparse-host #'unparse-unix-host)
543 (:unparse-directory #'unparse-unix-directory)
544 (:unparse-file #'unparse-unix-file)
545 (:unparse-enough #'unparse-unix-enough)
546 (:customary-case :lower))
547 (:make-load-form-fun make-unix-host-load-form))
548 )
549
550 (defvar *unix-host* (make-unix-host))
551
552 (defun make-unix-host-load-form (host)
553 (declare (ignore host))
554 '*unix-host*)
555
556
557 ;;;; Wildcard matching stuff.
558
559 (defmacro enumerate-matches ((var pathname &optional result
560 &key (verify-existance t) (follow-links t))
561 &body body)
562 (let ((body-name (gensym)))
563 `(block nil
564 (flet ((,body-name (,var)
565 ,@body))
566 (%enumerate-matches (pathname ,pathname)
567 ,verify-existance ,follow-links
568 #',body-name)
569 ,result))))
570
571 (defun %enumerate-matches (pathname verify-existance follow-links function)
572 (when (pathname-type pathname)
573 (unless (pathname-name pathname)
574 (error "Cannot supply a type without a name:~% ~S" pathname)))
575 (let ((directory (pathname-directory pathname)))
576 (if directory
577 (ecase (car directory)
578 (:absolute
579 (%enumerate-directories "/" (cdr directory) pathname
580 verify-existance follow-links
581 nil function))
582 (:relative
583 (%enumerate-directories "" (cdr directory) pathname
584 verify-existance follow-links
585 nil function)))
586 (%enumerate-files "" pathname verify-existance function))))
587
588 ;;; %enumerate-directories -- Internal
589 ;;;
590 ;;; The directory node and device numbers are maintained for the current path
591 ;;; during the search for the detection of path loops upon :wild-inferiors.
592 ;;;
593 (defun %enumerate-directories (head tail pathname verify-existance
594 follow-links nodes function)
595 (declare (simple-string head))
596 (macrolet ((unix-xstat (name)
597 `(if follow-links
598 (unix:unix-stat ,name)
599 (unix:unix-lstat ,name)))
600 (with-directory-node-noted ((head) &body body)
601 `(multiple-value-bind (res dev ino mode)
602 (unix-xstat ,head)
603 (when (and res (eql (logand mode unix:s-ifmt) unix:s-ifdir))
604 (let ((nodes (cons (cons dev ino) nodes)))
605 ,@body))))
606 (do-directory-entries ((name directory) &body body)
607 `(let ((dir (unix:open-dir ,directory)))
608 (when dir
609 (unwind-protect
610 (loop
611 (let ((,name (unix:read-dir dir)))
612 (cond ((null ,name)
613 (return))
614 ((string= ,name "."))
615 ((string= ,name ".."))
616 (t
617 ,@body))))
618 (unix:close-dir dir))))))
619 (if tail
620 (let ((piece (car tail)))
621 (etypecase piece
622 (simple-string
623 (let ((head (concatenate 'string head piece)))
624 (with-directory-node-noted (head)
625 (%enumerate-directories (concatenate 'string head "/")
626 (cdr tail) pathname
627 verify-existance follow-links
628 nodes function))))
629 ((member :wild-inferiors)
630 (%enumerate-directories head (rest tail) pathname
631 verify-existance follow-links
632 nodes function)
633 (do-directory-entries (name head)
634 (let ((subdir (concatenate 'string head name)))
635 (multiple-value-bind (res dev ino mode)
636 (unix-xstat subdir)
637 (declare (type (or fixnum null) mode))
638 (when (and res (eql (logand mode unix:s-ifmt) unix:s-ifdir))
639 (unless (dolist (dir nodes nil)
640 (when (and (eql (car dir) dev)
641 (eql (cdr dir) ino))
642 (return t)))
643 (let ((nodes (cons (cons dev ino) nodes))
644 (subdir (concatenate 'string subdir "/")))
645 (%enumerate-directories subdir tail pathname
646 verify-existance follow-links
647 nodes function))))))))
648 ((or pattern (member :wild))
649 (do-directory-entries (name head)
650 (when (or (eq piece :wild) (pattern-matches piece name))
651 (let ((subdir (concatenate 'string head name)))
652 (multiple-value-bind (res dev ino mode)
653 (unix-xstat subdir)
654 (declare (type (or fixnum null) mode))
655 (when (and res
656 (eql (logand mode unix:s-ifmt) unix:s-ifdir))
657 (let ((nodes (cons (cons dev ino) nodes))
658 (subdir (concatenate 'string subdir "/")))
659 (%enumerate-directories subdir (rest tail) pathname
660 verify-existance follow-links
661 nodes function))))))))
662 ((member :up)
663 (let ((head (concatenate 'string head "..")))
664 (with-directory-node-noted (head)
665 (%enumerate-directories (concatenate 'string head "/")
666 (rest tail) pathname
667 verify-existance follow-links
668 nodes function))))))
669 (%enumerate-files head pathname verify-existance function))))
670
671 (defun %enumerate-files (directory pathname verify-existance function)
672 (declare (simple-string directory))
673 (let ((name (%pathname-name pathname))
674 (type (%pathname-type pathname))
675 (version (%pathname-version pathname)))
676 (cond ((member name '(nil :unspecific))
677 (when (or (not verify-existance)
678 (unix:unix-file-kind directory))
679 (funcall function directory)))
680 ((or (pattern-p name)
681 (pattern-p type)
682 (eq name :wild)
683 (eq type :wild)
684 (eq version :wild))
685 (let ((dir (unix:open-dir directory)))
686 (when dir
687 (unwind-protect
688 (loop
689 (let ((file (unix:read-dir dir)))
690 (if file
691 (unless (or (string= file ".")
692 (string= file ".."))
693 (multiple-value-bind
694 (file-name file-type file-version)
695 (let ((*ignore-wildcards* t))
696 (extract-name-type-and-version
697 file 0 (length file)))
698 ;; Match also happens if the file has
699 ;; no explicit version and we're asking
700 ;; for version :NEWEST, since that's
701 ;; what no version means.
702 (when (and (components-match file-name name)
703 (components-match file-type type)
704 (or (components-match file-version
705 version)
706 (and (eq file-version nil)
707 (eq version :newest))))
708 (funcall function
709 (concatenate 'string
710 directory
711 file)))))
712 (return))))
713 (unix:close-dir dir)))))
714 (t
715 (let ((file (concatenate 'string directory name)))
716 (unless (or (null type) (eq type :unspecific))
717 (setf file (concatenate 'string file "." type)))
718 (unless (member version '(nil :newest :wild :unspecific))
719 (setf file (concatenate 'string file ".~"
720 (quick-integer-to-string version)
721 "~")))
722 (when (or (not verify-existance)
723 (unix:unix-file-kind file t))
724 (funcall function file)))))))
725
726 (defun quick-integer-to-string (n)
727 (declare (type integer n))
728 (cond ((not (fixnump n))
729 (write-to-string n :base 10 :radix nil))
730 ((zerop n) "0")
731 ((eql n 1) "1")
732 ((minusp n)
733 (concatenate 'simple-string "-"
734 (the simple-string (quick-integer-to-string (- n)))))
735 (t
736 (do* ((len (1+ (truncate (integer-length n) 3)))
737 (res (make-string len))
738 (i (1- len) (1- i))
739 (q n)
740 (r 0))
741 ((zerop q)
742 (incf i)
743 (replace res res :start2 i :end2 len)
744 (shrink-vector res (- len i)))
745 (declare (simple-string res)
746 (fixnum len i r q))
747 (multiple-value-setq (q r) (truncate q 10))
748 (setf (schar res i) (schar "0123456789" r))))))
749
750
751 ;;;; UNIX-NAMESTRING -- public
752 ;;;
753 (defun unix-namestring (pathname &optional (for-input t) executable-only)
754 "Convert PATHNAME into a string that can be used with UNIX system calls.
755 Search-lists and wild-cards are expanded. If optional argument
756 FOR-INPUT is true and PATHNAME doesn't exist, NIL is returned.
757 If optional argument EXECUTABLE-ONLY is true, NIL is returned
758 unless an executable version of PATHNAME exists."
759 ;; toy@rtp.ericsson.se: Let unix-namestring also handle logical
760 ;; pathnames too.
761 (let ((path (let ((lpn (pathname pathname)))
762 (if (logical-pathname-p lpn)
763 (namestring (translate-logical-pathname lpn))
764 pathname))))
765 (enumerate-search-list
766 (pathname path)
767 (collect ((names))
768 (enumerate-matches (name pathname nil :verify-existance for-input
769 :follow-links t)
770 (when (or (not executable-only)
771 (and (eq (unix:unix-file-kind name) :file)
772 (unix:unix-access name unix:x_ok)))
773 (names name)))
774 (let ((names (names)))
775 (when names
776 (when (cdr names)
777 (error 'simple-file-error
778 :format-control "~S is ambiguous:~{~% ~A~}"
779 :format-arguments (list pathname names)))
780 (return (car names))))))))
781
782
783 ;;;; TRUENAME and PROBE-FILE.
784
785 ;;; Truename -- Public
786 ;;;
787 ;;; Another silly file function trivially different from another function.
788 ;;;
789 (defun truename (pathname)
790 "Return the pathname for the actual file described by the pathname
791 An error of type file-error is signalled if no such file exists,
792 or the pathname is wild."
793 (if (wild-pathname-p pathname)
794 (error 'simple-file-error
795 :format-control "Bad place for a wild pathname."
796 :pathname pathname)
797 (let ((result (probe-file pathname)))
798 (unless result
799 (error 'simple-file-error
800 :pathname pathname
801 :format-control "The file ~S does not exist."
802 :format-arguments (list (namestring pathname))))
803 result)))
804
805 ;;; Probe-File -- Public
806 ;;;
807 ;;; If PATHNAME exists, return its truename, otherwise NIL.
808 ;;;
809 (defun probe-file (pathname)
810 "Return a pathname which is the truename of the file if it exists, NIL
811 otherwise. An error of type file-error is signalled if pathname is wild."
812 (if (wild-pathname-p pathname)
813 (error 'simple-file-error
814 :pathname pathname
815 :format-control "Bad place for a wild pathname.")
816 (let ((namestring (unix-namestring (merge-pathnames pathname) t)))
817 (when (and namestring (unix:unix-file-kind namestring))
818 (let ((truename (unix:unix-resolve-links
819 (unix:unix-maybe-prepend-current-directory
820 namestring))))
821 (when truename
822 (let ((*ignore-wildcards* t))
823 (pathname (unix:unix-simplify-pathname truename)))))))))
824
825
826 ;;;; Other random operations.
827
828 ;;; Rename-File -- Public
829 ;;;
830 (defun rename-file (file new-name)
831 "Rename File to have the specified New-Name. If file is a stream open to a
832 file, then the associated file is renamed."
833 (let* ((original (truename file))
834 (original-namestring (unix-namestring original t))
835 (new-name (merge-pathnames new-name original))
836 (new-namestring (unix-namestring new-name nil)))
837 (unless new-namestring
838 (error 'simple-file-error
839 :pathname new-name
840 :format-control "~S can't be created."
841 :format-arguments (list new-name)))
842 (multiple-value-bind (res error)
843 (unix:unix-rename original-namestring
844 new-namestring)
845 (unless res
846 (error 'simple-file-error
847 :pathname new-name
848 :format-control "Failed to rename ~A to ~A: ~A"
849 :format-arguments (list original new-name
850 (unix:get-unix-error-msg error))))
851 (when (streamp file)
852 (file-name file new-namestring))
853 (values new-name original (truename new-name)))))
854
855 ;;; Delete-File -- Public
856 ;;;
857 ;;; Delete the file, Man.
858 ;;;
859 (defun delete-file (file)
860 "Delete the specified file."
861 (let ((namestring (unix-namestring file t)))
862 (when (streamp file)
863 ;; Close the file, but don't try to revert or anything. We want
864 ;; to delete it, man!
865 (close file))
866 (unless namestring
867 (error 'simple-file-error
868 :pathname file
869 :format-control "~S doesn't exist."
870 :format-arguments (list file)))
871
872 (multiple-value-bind (res err) (unix:unix-unlink namestring)
873 (unless res
874 (error 'simple-file-error
875 :pathname namestring
876 :format-control "Could not delete ~A: ~A."
877 :format-arguments (list namestring
878 (unix:get-unix-error-msg err))))))
879 t)
880
881 ;;; Purge-Backup-Files -- Public
882 ;;;
883 ;;; Purge old file versions
884 ;;;
885 (defun purge-backup-files (pathname &optional (keep 0))
886 "Delete old versions of files matching the given Pathname,
887 optionally keeping some of the most recent old versions."
888 (declare (type (or pathname string stream) pathname)
889 (type (integer 0 *) keep))
890 (let ((hash (make-hash-table :test 'equal)))
891 (enumerate-search-list
892 (path (make-pathname :version :wild :defaults pathname))
893 (clrhash hash)
894 (enumerate-matches (name path nil :follow-links nil)
895 (let ((dot (position #\. name :from-end t))
896 (len (length name)))
897 (when (and dot
898 (> len (+ dot 3))
899 (char= (char name (1+ dot)) #\~)
900 (char= (char name (1- len)) #\~)
901 (eq (unix:unix-file-kind name) :file))
902 (multiple-value-bind (version next)
903 (parse-integer name :start (+ dot 2) :end (1- len)
904 :junk-allowed t)
905 (when (and version (= next (1- len)))
906 (push (cons version name)
907 (gethash (subseq name 0 dot) hash '())))))))
908 (maphash (lambda (key value)
909 (declare (ignore key))
910 (mapc #'unix:unix-unlink
911 (mapcar #'cdr (nthcdr keep
912 (sort value #'> :key #'car)))))
913 hash))))
914
915
916 ;;; User-Homedir-Pathname -- Public
917 ;;;
918 ;;; Return Home:, which is set up for us at initialization time.
919 ;;;
920 (defun user-homedir-pathname (&optional host)
921 "Returns the home directory of the logged in user as a pathname.
922 This is obtained from the logical name \"home:\"."
923 (declare (ignore host))
924 #p"home:")
925
926 ;;; File-Write-Date -- Public
927 ;;;
928 (defun file-write-date (file)
929 "Return file's creation date, or NIL if it doesn't exist.
930 An error of type file-error is signalled if file is a wild pathname"
931 (if (wild-pathname-p file)
932 (error 'simple-file-error
933 :pathname file
934 :format-control "Bad place for a wild pathname.")
935 (let ((name (unix-namestring file t)))
936 (when name
937 (multiple-value-bind
938 (res dev ino mode nlink uid gid rdev size atime mtime)
939 (unix:unix-stat name)
940 (declare (ignore dev ino mode nlink uid gid rdev size atime))
941 (when res
942 (+ unix-to-universal-time mtime)))))))
943
944 ;;; File-Author -- Public
945 ;;;
946 (defun file-author (file)
947 "Returns the file author as a string, or nil if the author cannot be
948 determined. Signals an error of type file-error if file doesn't exist,
949 or file is a wild pathname."
950 (if (wild-pathname-p file)
951 (error 'simple-file-error
952 :pathname file
953 :format-control "Bad place for a wild pathname.")
954 (let ((name (unix-namestring (pathname file) t)))
955 (unless name
956 (error 'simple-file-error
957 :pathname file
958 :format-control "~S doesn't exist."
959 :format-arguments (list file)))
960 (multiple-value-bind (winp dev ino mode nlink uid)
961 (unix:unix-stat name)
962 (declare (ignore dev ino mode nlink))
963 (when winp
964 (let ((user-info (unix:unix-getpwuid uid)))
965 (when user-info
966 (unix:user-info-name user-info))))))))
967
968
969 ;;;; DIRECTORY.
970
971 ;;; DIRECTORY -- public.
972 ;;;
973 (defun directory (pathname &key (all t) (check-for-subdirs t)
974 (truenamep t) (follow-links t))
975 "Returns a list of pathnames, one for each file that matches the given
976 pathname. Supplying :ALL as nil causes this to ignore Unix dot files. This
977 never includes Unix dot and dot-dot in the result. If :TRUENAMEP is NIL,
978 then symbolic links in the result are not expanded, which is not the
979 default because TRUENAME does follow links and the result pathnames are
980 defined to be the TRUENAME of the pathname (the truename of a link may well
981 be in another directory). If FOLLOW-LINKS is NIL then symbolic links are
982 not followed."
983 (let ((results nil))
984 (enumerate-search-list
985 (pathname (merge-pathnames pathname
986 (make-pathname :name :wild
987 :type :wild
988 :version :wild
989 :defaults *default-pathname-defaults*)
990 :wild))
991 (enumerate-matches (name pathname nil :follow-links follow-links)
992 (when (or all
993 (let ((slash (position #\/ name :from-end t)))
994 (or (null slash)
995 (= (1+ slash) (length name))
996 (char/= (schar name (1+ slash)) #\.))))
997 (push name results))))
998 (let ((*ignore-wildcards* t))
999 (mapcar #'(lambda (name)
1000 (let ((name (if (and check-for-subdirs
1001 (eq (unix:unix-file-kind name)
1002 :directory))
1003 (concatenate 'string name "/")
1004 name)))
1005 (if truenamep (truename name) (pathname name))))
1006 (sort (delete-duplicates results :test #'string=) #'string<)))))
1007
1008
1009 ;;;; Printing directories.
1010
1011 ;;; PRINT-DIRECTORY is exported from the EXTENSIONS package.
1012 ;;;
1013 (defun print-directory (pathname &optional stream &key all verbose return-list)
1014 "Like Directory, but prints a terse, multi-column directory listing
1015 instead of returning a list of pathnames. When :all is supplied and
1016 non-nil, then Unix dot files are included too (as ls -a). When :verbose
1017 is supplied and non-nil, then a long listing of miscellaneous
1018 information is output one file per line."
1019 (let ((*standard-output* (out-synonym-of stream))
1020 (pathname pathname))
1021 (if verbose
1022 (print-directory-verbose pathname all return-list)
1023 (print-directory-formatted pathname all return-list))))
1024
1025 (defun print-directory-verbose (pathname all return-list)
1026 (let ((contents (directory pathname :all all :check-for-subdirs nil
1027 :truenamep nil))
1028 (result nil))
1029 (format t "Directory of ~A:~%" (namestring pathname))
1030 (dolist (file contents)
1031 (let* ((namestring (unix-namestring file))
1032 (tail (subseq namestring
1033 (1+ (or (position #\/ namestring
1034 :from-end t
1035 :test #'char=)
1036 -1)))))
1037 (multiple-value-bind
1038 (reslt dev-or-err ino mode nlink uid gid rdev size atime mtime)
1039 (unix:unix-stat namestring)
1040 (declare (ignore ino gid rdev atime)
1041 (fixnum uid mode))
1042 (cond (reslt
1043 ;;
1044 ;; Print characters for file modes.
1045 (macrolet ((frob (bit name &optional sbit sname negate)
1046 `(if ,(if negate
1047 `(not (logbitp ,bit mode))
1048 `(logbitp ,bit mode))
1049 ,(if sbit
1050 `(if (logbitp ,sbit mode)
1051 (write-char ,sname)
1052 (write-char ,name))
1053 `(write-char ,name))
1054 (write-char #\-))))
1055 (frob 15 #\d nil nil t)
1056 (frob 8 #\r)
1057 (frob 7 #\w)
1058 (frob 6 #\x 11 #\s)
1059 (frob 5 #\r)
1060 (frob 4 #\w)
1061 (frob 3 #\x 10 #\s)
1062 (frob 2 #\r)
1063 (frob 1 #\w)
1064 (frob 0 #\x))
1065 ;;
1066 ;; Print the rest.
1067 (multiple-value-bind (sec min hour date month year)
1068 (get-decoded-time)
1069 (declare (ignore sec min hour date month))
1070 (format t "~2D ~8A ~8D ~12A ~A~@[/~]~%"
1071 nlink
1072 (let ((user-info (unix:unix-getpwuid uid)))
1073 (if user-info (unix:user-info-name user-info) uid))
1074 size
1075 (decode-universal-time-for-files mtime year)
1076 tail
1077 (= (logand mode unix:s-ifmt) unix:s-ifdir))))
1078 (t (format t "Couldn't stat ~A -- ~A.~%"
1079 tail
1080 (unix:get-unix-error-msg dev-or-err))))
1081 (when return-list
1082 (push (if (= (logand mode unix:s-ifmt) unix:s-ifdir)
1083 (pathname (concatenate 'string namestring "/"))
1084 file)
1085 result)))))
1086 (nreverse result)))
1087
1088 (defun decode-universal-time-for-files (time current-year)
1089 (multiple-value-bind (sec min hour day month year)
1090 (decode-universal-time (+ time unix-to-universal-time))
1091 (declare (ignore sec))
1092 (format nil "~A ~2,' D ~:[ ~D~;~*~2,'0D:~2,'0D~]"
1093 (svref '#("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug"
1094 "Sep" "Oct" "Nov" "Dec")
1095 (1- month))
1096 day (= current-year year) year hour min)))
1097
1098 (defun print-directory-formatted (pathname all return-list)
1099 (let ((width (or (line-length *standard-output*) 80))
1100 (names ())
1101 (cnt 0)
1102 (max-len 0)
1103 (result (directory pathname :all all :truenamep nil)))
1104 (declare (list names) (fixnum max-len cnt))
1105 ;;
1106 ;; Get the data.
1107 (dolist (file result)
1108 (let* ((name (unix-namestring file))
1109 (length (length name))
1110 (end (if (and (plusp length)
1111 (char= (schar name (1- length)) #\/))
1112 (1- length)
1113 length))
1114 (slash-name (subseq name
1115 (1+ (or (position #\/ name
1116 :from-end t
1117 :end end
1118 :test #'char=)
1119 -1))))
1120 (len (length slash-name)))
1121 (declare (simple-string slash-name)
1122 (fixnum len))
1123 (if (> len max-len) (setq max-len len))
1124 (incf cnt)
1125 (push slash-name names)))
1126 (setq names (nreverse names))
1127 ;;
1128 ;; Do the output.
1129 (let* ((col-width (1+ max-len))
1130 (cols (max (truncate width col-width) 1))
1131 (lines (ceiling cnt cols)))
1132 (declare (fixnum cols lines))
1133 (format t "Directory of ~A:~%" (namestring pathname))
1134 (dotimes (i lines)
1135 (declare (fixnum i))
1136 (dotimes (j cols)
1137 (declare (fixnum j))
1138 (let ((name (nth (+ i (the fixnum (* j lines))) names)))
1139 (when name
1140 (write-string name)
1141 (unless (eql j (1- cols))
1142 (dotimes (i (- col-width (length (the simple-string name))))
1143 (write-char #\space))))))
1144 (terpri)))
1145 (when return-list
1146 result)))
1147
1148
1149 ;;;; File completion.
1150
1151 ;;; COMPLETE-FILE -- Public
1152 ;;;
1153 (defun complete-file (pathname &key (defaults *default-pathname-defaults*)
1154 ignore-types)
1155 (let ((files (directory (complete-file-directory-arg pathname defaults)
1156 :check-for-subdirs nil
1157 :truenamep nil)))
1158 (cond ((null files)
1159 (values nil nil))
1160 ((null (cdr files))
1161 (values (merge-pathnames (file-namestring (car files))
1162 pathname)
1163 t))
1164 (t
1165 (let ((good-files
1166 (delete-if #'(lambda (pathname)
1167 (and (simple-string-p
1168 (pathname-type pathname))
1169 (member (pathname-type pathname)
1170 ignore-types
1171 :test #'string=)))
1172 files)))
1173 (cond ((null good-files))
1174 ((null (cdr good-files))
1175 (return-from complete-file
1176 (values (merge-pathnames (file-namestring
1177 (car good-files))
1178 pathname)
1179 t)))
1180 (t
1181 (setf files good-files)))
1182 (let ((common (file-namestring (car files))))
1183 (dolist (file (cdr files))
1184 (let ((name (file-namestring file)))
1185 (dotimes (i (min (length common) (length name))
1186 (when (< (length name) (length common))
1187 (setf common name)))
1188 (unless (char= (schar common i) (schar name i))
1189 (setf common (subseq common 0 i))
1190 (return)))))
1191 (values (merge-pathnames common pathname)
1192 nil)))))))
1193
1194 ;;; COMPLETE-FILE-DIRECTORY-ARG -- Internal.
1195 ;;;
1196 (defun complete-file-directory-arg (pathname defaults)
1197 (let* ((pathname (merge-pathnames pathname (directory-namestring defaults)))
1198 (type (pathname-type pathname)))
1199 (flet ((append-multi-char-wild (thing)
1200 (etypecase thing
1201 (null :wild)
1202 (pattern
1203 (make-pattern (append (pattern-pieces thing)
1204 (list :multi-char-wild))))
1205 (simple-string
1206 (make-pattern (list thing :multi-char-wild))))))
1207 (if (or (null type) (eq type :unspecific))
1208 ;; There is no type.
1209 (make-pathname :defaults pathname
1210 :name (append-multi-char-wild (pathname-name pathname))
1211 :type :wild)
1212 ;; There already is a type, so just extend it.
1213 (make-pathname :defaults pathname
1214 :name (pathname-name pathname)
1215 :type (append-multi-char-wild (pathname-type pathname)))))))
1216
1217 ;;; Ambiguous-Files -- Public
1218 ;;;
1219 (defun ambiguous-files (pathname
1220 &optional (defaults *default-pathname-defaults*))
1221 "Return a list of all files which are possible completions of Pathname.
1222 We look in the directory specified by Defaults as well as looking down
1223 the search list."
1224 (directory (complete-file-directory-arg pathname defaults)
1225 :truenamep nil
1226 :check-for-subdirs nil))
1227
1228
1229
1230 ;;; File-writable -- exported from extensions.
1231 ;;;
1232 ;;; Determines whether the single argument (which should be a pathname)
1233 ;;; can be written by the current task.
1234 ;;;
1235 (defun file-writable (name)
1236 "File-writable accepts a pathname and returns T if the current
1237 process can write it, and NIL otherwise."
1238 (let ((name (unix-namestring name nil)))
1239 (cond ((null name)
1240 nil)
1241 ((unix:unix-file-kind name)
1242 (values (unix:unix-access name unix:w_ok)))
1243 (t
1244 (values
1245 (unix:unix-access (subseq name
1246 0
1247 (or (position #\/ name :from-end t)
1248 0))
1249 (logior unix:w_ok unix:x_ok)))))))
1250
1251
1252 ;;; Pathname-Order -- Internal
1253 ;;;
1254 ;;; Predicate to order pathnames by. Goes by name.
1255 ;;;
1256 (defun pathname-order (x y)
1257 (let ((xn (%pathname-name x))
1258 (yn (%pathname-name y)))
1259 (if (and xn yn)
1260 (let ((res (string-lessp xn yn)))
1261 (cond ((not res) nil)
1262 ((= res (length (the simple-string xn))) t)
1263 ((= res (length (the simple-string yn))) nil)
1264 (t t)))
1265 xn)))
1266
1267
1268 ;;; Default-Directory -- Public
1269 ;;;
1270 (defun default-directory ()
1271 "Returns the pathname for the default directory. This is the place where
1272 a file will be written if no directory is specified. This may be changed
1273 with setf."
1274 (multiple-value-bind (gr dir-or-error)
1275 (unix:unix-current-directory)
1276 (if gr
1277 (let ((*ignore-wildcards* t))
1278 (values
1279 (parse-namestring (concatenate 'simple-string dir-or-error "/")
1280 *unix-host*)))
1281 (error dir-or-error))))
1282
1283 ;;; %Set-Default-Directory -- Internal
1284 ;;;
1285 (defun %set-default-directory (new-val)
1286 (let ((namestring (unix-namestring new-val t)))
1287 (unless namestring
1288 (error 'simple-file-error
1289 :format-control "~S doesn't exist."
1290 :format-arguments (list new-val)))
1291 (multiple-value-bind (gr error)
1292 (unix:unix-chdir namestring)
1293 (if gr
1294 (setf (search-list "default:") (default-directory))
1295 (error (unix:get-unix-error-msg error))))
1296 new-val))
1297 ;;;
1298 (defsetf default-directory %set-default-directory)
1299
1300 (defun filesys-init ()
1301 ;; Use :unspecific so we don't create file versions whenever merging
1302 ;; happens. If the user wants that, let him change
1303 ;; *default-pathname-defaults* appropriately.
1304 (setf *default-pathname-defaults*
1305 (%make-pathname *unix-host* nil nil nil nil :unspecific))
1306 (setf (search-list "default:") (default-directory))
1307 nil)
1308
1309 ;;; Ensure-Directories-Exist -- Public
1310 ;;;
1311 (defun ensure-directories-exist (pathspec &key verbose (mode #o777))
1312 "Tests whether the directories containing the specified file
1313 actually exist, and attempts to create them if they do not.
1314 Portable programs should avoid using the :MODE keyword argument."
1315 (let* ((pathname (pathname pathspec))
1316 (pathname (if (logical-pathname-p pathname)
1317 (translate-logical-pathname pathname)
1318 pathname))
1319 (created-p nil))
1320 (when (wild-pathname-p pathname)
1321 (error 'simple-file-error
1322 :format-control "Bad place for a wild pathname."
1323 :pathname pathspec))
1324 (enumerate-search-list (pathname pathname)
1325 (let ((dir (pathname-directory pathname)))
1326 (loop for i from 1 upto (length dir)
1327 do (let ((newpath (make-pathname
1328 :host (pathname-host pathname)
1329 :device (pathname-device pathname)
1330 :directory (subseq dir 0 i))))
1331 (tagbody
1332 retry
1333 (restart-case
1334 (unless (probe-file newpath)
1335 (let ((namestring (namestring newpath)))
1336 (when verbose
1337 (format *standard-output* "~&Creating directory: ~A~%"
1338 namestring))
1339 (unix:unix-mkdir namestring mode)
1340 (unless (probe-file namestring)
1341 (error 'simple-file-error
1342 :pathname pathspec
1343 :format-control "Can't create directory ~A."
1344 :format-arguments (list namestring)))
1345 (setf created-p t)))
1346 (retry () :report "Try to create the directory again"
1347 (go retry))))))
1348 ;; Only the first path in a search-list is considered.
1349 (return (values pathname created-p))))))

  ViewVC Help
Powered by ViewVC 1.1.5