Reading from a UNIX volume..
Jim Witte
jswitte at bloomington.in.us
Mon Aug 11 21:28:01 EDT 2003
Hi,
I know, Rev probably isn't the best environment to do this particular
thing in, but I'm just experimenting for the time being.. I want to
write a script that will read an entire ATA volume (via USB adapter)
into a field.. The current volume I'm working with is only 8MB, so
this should be feasible. The script I currently have is;
open file "/dev/rdisk3" for binary read
put the result into item 1 of ret
* read from file "/dev/rdisk3" for 4096 -- until EOF
put the result into item 2 of ret
put it into fld "rtext"
close file "/dev/rdisk3"
put the result into item 3 of ret
The script as written works, but if I change the starred line to 'until
EOF' it doesn't - it gives a result code of 'eof' for the read command.
Does EOF do strange things if the thing you're reading from is a
volume, and not a "real" file (whatever real means). Is there a better
way to read directly from a volume other doing a file read from /dev/* ?
Thanks,
Jim
More information about the use-livecode
mailing list