123456789101112131415161718192021 |
- (define-module (utils os))
- (define-public path-join
- (lambda (. parts)
- (let ([parts-no-trailing-slashes
- (map (lambda (part)
- (string-trim-right part
- (lambda (char)
- #
- (simple-format
- #f "checking char: ~a ... will remain? ~a\n"
- char
- (if (char=? char #\/) "no" "yes")))
- (char=? char
- (car
- (string->list
- file-name-separator-string))))))
- parts)])
- (string-join parts-no-trailing-slashes file-name-separator-string))))
|