1. How do I return the length of an open binary file?
How do I get the length of an open reading binary "rb" file returned?
--Alan
=
2. Re: How do I return the length of an open binary file?
At 04:12 PM 6/19/98 -0400, you wrote:
>
>How do I get the length of an open reading binary "rb" file returned?
>
>--Alan
The easiest way is to seek() to
the end of the file and then read
the length with where().
i.e
include file.e
integer fn,junk,file_length
fn=open(somepath,"rb")
junk=seek(fn,-1) -- -1 for EOF
file_length=where(fn) -- where an I?
You will probably want to follow this with;
junk=seek(fn,0)
To start reading from the start of the file again.
Graeme.
----------------------------------------------------