fopen and $file().size - 18/11/03 02:16 AM
$file().size doesn't seem to report the correct file size while a process is running that may change the file size unless the file is closed first.
//fopen -on test test.txt | echo -a $file(test.txt).size | fwrite -n test this is a test | echo -a $file(test.txt).size | fwrite -n test this is another test | echo -a $file(test.txt).size | fclose test | echo -a $file(test.txt).size
it's fine with me if $file().size is out of synch with files opened using fopen during a process, it would be nice though to have $fopen().fsize since that would likely be faster anyways.
In the mean-time....
fseek test 81203948074523
%filesize = $fopen(test).pos
//fopen -on test test.txt | echo -a $file(test.txt).size | fwrite -n test this is a test | echo -a $file(test.txt).size | fwrite -n test this is another test | echo -a $file(test.txt).size | fclose test | echo -a $file(test.txt).size
it's fine with me if $file().size is out of synch with files opened using fopen during a process, it would be nice though to have $fopen().fsize since that would likely be faster anyways.
In the mean-time....
fseek test 81203948074523
%filesize = $fopen(test).pos