File - read from EOF

Mike Bonner bonnmike at gmail.com
Sat May 27 22:50:51 EDT 2017


I think you need to do the following

First get the length in bytes of the file
get the number of bytes in url ("binfile:" & yourfile)

I have a file that I just did this on and there are 289558088 bytes

Then you can either start reading at byte -whatever to -1 to grab the last
part, adjusting the numbers for each read till you get done.

Or of course read bytes from whateverposition to 289558088 and adjust those
numbers each loop.

Untried, and outside my specific areas of knowledge, but I think it should
work fine.



On Sat, May 27, 2017 at 7:23 PM, JB via use-livecode <
use-livecode at lists.runrev.com> wrote:

> I want to read a file as binary of any
> size but as crazy as it sounds I want
> to read in sections form the EOF and
> stop at the beginning of the file instead
> reading from the start to EOF.
>
> I have no problems opening, reading and
> closing files or reading in sections.
>
> Does anyone know the easiest way
> to determine when I reach the start
> of the file similar to using EOF to
> stop reading at the end of the file?
>
> JB
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list