One OutputStream and one InputStream are opened on the same file:
atmp = OpenAppend["tmp"];
Write[atmp, "a"];
Write[atmp, "b"];
Write[atmp, "cde"];
rtmp = OpenRead["tmp"];
Read[rtmp];
Write[atmp, "ABC"];
ReadList[rtmp]
{"b", "cde"}
What happend to ABC?
Read[rtmp]
EndOfFile
FilePrint["tmp"]
"a" "b" "cde" "ABC"
OK.
One after the other, close one, open the other.
But still skeptical.
Shouldn't I be able to set the StreamPosition now?
atmp = OpenAppend["tmp"];
Write[atmp, "a"];
Write[atmp, "bc"];
Write[atmp, "def"];
StreamPosition[atmp];
Close[atmp];
rtmp = OpenRead["tmp"];
Read[rtmp];
ReadList[rtmp];
StreamPosition[rtmp];
SetStreamPosition[rtmp, 1];
Read[rtmp];
FilePrint["tmp"];
Close[rtmp];
DeleteFile["tmp"];
Streams[];