#| -*-Scheme-*-
-$Id: sfile.scm,v 14.20 1999/01/02 06:19:10 cph Exp $
+$Id: sfile.scm,v 14.21 1999/11/19 14:10:49 cph Exp $
Copyright (c) 1988-1999 Massachusetts Institute of Technology
((ucode-primitive file-eq?) (->namestring (merge-pathnames x))
(->namestring (merge-pathnames y))))
+(define (current-file-time)
+ (call-with-temporary-file-pathname file-modification-time))
+
+(define (directory-file-names directory)
+ (let ((channel
+ (directory-channel-open
+ (->namestring (pathname-as-directory directory)))))
+ (let loop ((result '()))
+ (let ((name (directory-channel-read channel)))
+ (if name
+ (loop
+ (if (or (string=? "." name)
+ (string=? ".." name))
+ result
+ (cons name result)))
+ (begin
+ (directory-channel-close channel)
+ result))))))
+\f
(define (call-with-temporary-filename receiver)
(call-with-temporary-file-pathname
(lambda (pathname)
(vector-set! objects slot
(delete! filename (vector-ref objects slot)))
((ucode-primitive set-fixed-objects-vector! 1) objects)))))
-
-(define (current-file-time)
- (call-with-temporary-file-pathname file-modification-time))
\f
(define (guarantee-init-file-specifier object procedure)
(if (not (init-file-specifier? object))