This generic function is applied to a pathname to recover the string representation of the pathname. Directory names are returned with a trailing slash.
(define p (string->file "foo/bar/baz.scm"))
(pathname->string p) "foo/bar/baz.scm"
(pathname->string (file-directory p)) "foo/bar/"
The returned string does not expand any special root locations. See also pathname->os-path.