From: Chris Hanson Date: Sun, 5 Jan 1997 23:46:13 +0000 (+0000) Subject: Use new directory reader to get better attribute information from X-Git-Tag: 20090517-FFI~5269 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=871fdf94f779a971ed529026313c2fdc1fe407a8;p=mit-scheme.git Use new directory reader to get better attribute information from Win32. This requires microcode 11.156 and runtime 14.172. --- diff --git a/v7/src/edwin/dos.scm b/v7/src/edwin/dos.scm index 135020381..0c54e31f8 100644 --- a/v7/src/edwin/dos.scm +++ b/v7/src/edwin/dos.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: dos.scm,v 1.42 1996/12/07 22:23:42 cph Exp $ +;;; $Id: dos.scm,v 1.43 1997/01/05 23:46:13 cph Exp $ ;;; -;;; Copyright (c) 1992-96 Massachusetts Institute of Technology +;;; Copyright (c) 1992-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -251,24 +251,16 @@ Switches may be concatenated, e.g. `-lt' is equivalent to `-l -t'." name)) (define (win32/read-dired-files file all-files?) - (let loop - ((pathnames - (let ((pathnames (directory-read file #f))) - (if all-files? - pathnames - (list-transform-positive pathnames - (let ((mask - (fix:or nt-file-mode/hidden nt-file-mode/system))) - (lambda (pathname) - (fix:= (fix:and (file-modes pathname) mask) 0))))))) - (result '())) - (if (null? pathnames) - result - (loop (cdr pathnames) - (let ((attr (file-attributes (car pathnames)))) - (if attr - (cons (cons (file-namestring (car pathnames)) attr) result) - result)))))) + (map (lambda (entry) (cons (->namestring (car entry)) (cdr entry))) + (let ((entries (directory-read file #f #t))) + (if all-files? + entries + (list-transform-positive entries + (let ((mask + (fix:or nt-file-mode/hidden nt-file-mode/system))) + (lambda (entry) + (fix:= (fix:and (file-attributes/modes (cdr entry)) mask) + 0)))))))) (define dired-pathname-wild? pathname-wild?) \ No newline at end of file