(module pathlike mzscheme
(provide (all-defined))
(define (pathlike? v)
(or (path? v) (string? v)))
(define (pathlike->bytes x)
(cond [(path? x) (path->bytes x)]
[(string? x) (path->bytes (string->path x))]
[else (raise-type-error 'pathlike->bytes "pathlike" x)]))
(define (pathlike->string x)
(cond [(path? x) (path->string x)]
[(string? x) x]
[else (raise-type-error 'pathlike->string "pathlike" x)]))
(define (pathlike->path x)
(cond [(path? x) x]
[(string? x) (string->path x)]
[else (raise-type-error 'pathlike->path "pathlike" x)]))
)