Minor addtions and corrections.

This commit is contained in:
Martin Gasbichler 2003-02-20 22:46:41 +00:00
parent 65faf0da98
commit 5a5b95a040
1 changed files with 8 additions and 3 deletions

View File

@ -1,10 +1,13 @@
The structure dir-streams defines procedures to represent and process
directories as streams of files and sub-directories.
Constructor: (dir-stream-from-dir-name dir-name [chase?] [parent]) -> dir-stream
(dir-stream-from-dirname dir-name [chase?] [parent]) -> dir-stream Constructor for dir-streams.
(dir-stream? thing) -> boolean (dir-stream? thing) -> boolean
Type predicate for dir-streams. Type predicate for dir-streams.
@ -12,10 +15,12 @@ Type predicate for dir-streams.
Returns the fs-object corresponding to the directory. Returns the fs-object corresponding to the directory.
(fs-object? thing) -> boolean (fs-object? thing) -> boolean
Type predicate for file-objects. Type predicate for file-objects.
(fs-object-parent fs-object) -> string (fs-object-parent fs-object) -> string
The parent directory of the fs-object. The parent directory of the fs-object.
@ -62,7 +67,7 @@ the files and subdirectories for which the predicates return #t.
files-make-stream files-stream-empty files-make-stream files-stream-empty
subdirs-make-stream subdirs-empty) -> return type of make-dir-stream subdirs-make-stream subdirs-empty) -> return type of make-dir-stream
Replaces the constuctors of the dir-stream by the supplied procedures. Replaces the constructors of the dir-stream by the supplied procedures.
Example: Example:
(define (disc-usage ds) (define (disc-usage ds)
(dir-stream-fold-right ds (lambda (fso sum subdirs) (list (fs-object-filename fso) (dir-stream-fold-right ds (lambda (fso sum subdirs) (list (fs-object-filename fso)