[plt-scheme] re-open a bytes/string port?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jan 16 08:53:34 EST 2009

At Thu, 15 Jan 2009 18:55:58 -0800, YC wrote:
> is there a way to *re-open* a bytes/string port?  With a file port, I can
> look at the object-name to obtain its path, and use that to open another
> port reading from the file, but it appears there isn't an equivalent
> mechanism for bytes/string unless I happen to have a handle of the original
> source.

There's no way to re-open the port. If the port is still open, you can
rewind to the beginning by using the (badly named) `file-position'
function.


Matthew



Posted on the users mailing list.