1. Get Open File Size
- Posted by Michael Nelson <MichaelANelson at WORLDNET.ATT.NET> Nov 28, 2000
- 560 views
- Last edited Nov 29, 2000
This function returns the size of an open file and restores the btye
position so the programmer doesn't have to worry about it.
Tested code:
include file.e
function file_size(integer fn)
atom save_ptr,size
save_ptr=where(fn)
if seek(fn,-1)!=0 then
--error handling goes here
end if
size=where(fn)
if seek(fn,save_ptr)!=0 then
--error handling goes here
end if
return size
end function
-- Mike Nelson

