From 8dc4af1e387027cca2cf0bf57eae4ebb4dec837e Mon Sep 17 00:00:00 2001 From: Martin Gasbichler Date: Thu, 13 Feb 2003 12:00:40 +0000 Subject: [PATCH] dirname -> dir-name --- scsh/dir-streams/dir-stream-predicates.scm | 2 +- scsh/dir-streams/dir-stream.scm | 16 ++++++++-------- scsh/dir-streams/interfaces.scm | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scsh/dir-streams/dir-stream-predicates.scm b/scsh/dir-streams/dir-stream-predicates.scm index 0b083b7..dce3ec3 100644 --- a/scsh/dir-streams/dir-stream-predicates.scm +++ b/scsh/dir-streams/dir-stream-predicates.scm @@ -57,7 +57,7 @@ ;;; test stuff ;(dir-stream-display -; (dir-stream-filter (dir-stream-from-dirname "/Users/eric/tmp") +; (dir-stream-filter (dir-stream-from-dir-name "/Users/eric/tmp") ; (lambda (fs-object) ; (display (fs-object-mtime fs-object)) ; (newline) diff --git a/scsh/dir-streams/dir-stream.scm b/scsh/dir-streams/dir-stream.scm index b03d85b..ea0e5e1 100644 --- a/scsh/dir-streams/dir-stream.scm +++ b/scsh/dir-streams/dir-stream.scm @@ -47,18 +47,18 @@ (fs-object-name fs-object))) -(define (dir-stream-from-dirname dirname . args) +(define (dir-stream-from-dir-name dir-name . args) ;; skip file in case of an error during file-info - (define (next-info ds parent dirname chase?) + (define (next-info ds parent dir-name chase?) (let ((file (read-directory-stream ds))) (if file (call-with-current-continuation (lambda (k) (with-handler (lambda (cond more) - (k (next-info ds parent dirname chase?))) + (k (next-info ds parent dir-name chase?))) (lambda () - (cons (make-fs-object (combine-path parent dirname) + (cons (make-fs-object (combine-path parent dir-name) file chase?) ds))))) @@ -66,16 +66,16 @@ (let-optionals args ((chase? #t) (parent "")) (let ((info-stream (stream-unfold (lambda (ds) - (next-info ds parent dirname chase?)) + (next-info ds parent dir-name chase?)) (call-with-current-continuation (lambda (k) (with-handler (lambda (cond more) (make-empty-stream)) (lambda () - (open-directory-stream (combine-path parent dirname))))))))) + (open-directory-stream (combine-path parent dir-name))))))))) (make-dir-stream - (make-fs-object parent dirname chase?) + (make-fs-object parent dir-name chase?) (stream-filter-map (lambda (fso) (and (not (file-info-dir? (fs-object-info fso))) fso)) @@ -83,7 +83,7 @@ (stream-filter-map (lambda (fso) (and (file-info-dir? (fs-object-info fso)) - (dir-stream-from-dirname + (dir-stream-from-dir-name (fs-object-name fso) chase? (fs-object-parent fso)))) info-stream))))) diff --git a/scsh/dir-streams/interfaces.scm b/scsh/dir-streams/interfaces.scm index 109aa70..f2246a0 100644 --- a/scsh/dir-streams/interfaces.scm +++ b/scsh/dir-streams/interfaces.scm @@ -1,5 +1,5 @@ (define-interface dir-streams-interface - (export dir-stream-from-dirname + (export dir-stream-from-dir-name dir-stream-for-each dir-stream-map dir-stream-filter