Suppose I manipulate a file with:
  open file "myfile"

And I may read any chunk from the file with:
  seek to 100 in file "myfile"
  read from file "myfile" for 100

The question is: how do I find out the current reading/writing position of
the file?

####
OK, I know the "URL" is rather powerful on handling files:
I can use something like:
  get char 100 to 200 of url ("file:myfile")

But it is slower on dealing with large files. It basically loads the entire
file onto RAM.

####
And how do you find out the size of a file? I am using:
  get length(url ("file:myfile"))

Again, Metacard loads the entire file onto RAM before it starts counting,
and took about 10 seconds to walkthrough a list of 600 files (various sizes)
on a Mac G4. 

I remember the forthcoming enhanced files() command should provide file size
info as well - or just my illusion?
I know the unix/linux users enjoy the shell command with this, but...


Regards,
LiangTyan Fui


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to