Is there any way to get the file size (filelength) for an open serial file that is being written to? The fin(chan,"filelength") doesn't seem to know the length until after the file is closed, but I need to know the length of the file while I'm writing to it, so that I can restrict the size.
For example, I wrote 100 bytes to a serial file, and would like to know that it is 100 bytes at any time. But, the filelength returns zero until I close and re-open the file.
-}serial "temp.txt"
-}open lock(1)"temp.txt
-}print(1)dim(100,"X")
-}print fin(1,"filelength")
0
-}close(1);open(1)"temp.txt";print fin(1,"filelength");close(1)
101