schemelib/io/filesystem.scm

14 lines
352 B
Scheme
Raw Normal View History

2020-07-02 15:35:58 +00:00
(define (build-path p1 p2)
(format "~a~a~a" p1 (directory-separator) p2))
(define (walk-rec path subpath)
(cond
((null? subpath) '())
(#t (append (walk (build-path path (car subpath))) (walk-rec path (cdr subpath))))
))
(define (walk path)
(cond
((file-directory? path) (walk-rec path (directory-list path)))
(#t (list path))))