21 lines
648 B
Scheme
21 lines
648 B
Scheme
(define-syntax run/strings-status
|
|
(syntax-rules ()
|
|
((_ epf)
|
|
(call-with-values
|
|
(lambda ()
|
|
(run/port+proc epf))
|
|
(lambda (port proc)
|
|
(let ((string-list (port->string-list port))
|
|
(status (wait proc)))
|
|
(close-input-port port)
|
|
(values string-list status)))))))
|
|
|
|
(define (directory-files . optional-args)
|
|
(let-optionals optional-args
|
|
((dir (cwd))
|
|
(dotfiles? #f))
|
|
(let ((abs-dir (absolute-file-name dir)))
|
|
(map (lambda (file)
|
|
(make-fs-object file abs-dir))
|
|
(scsh-directory-files abs-dir dotfiles?)))))
|