Kenneth Brody
4/25/2011 6:35:00 PM
On 4/25/2011 12:04 AM, luser- -droog wrote:
> On Apr 22, 6:56 pm, China Blue Veins<chine.b...@yahoo.com> wrote:
>> In article<f9e5bb32-545e-41a7-8e44-4489e7790...@y31g2000vbp.googlegroups..com>,
>> Peter Lauren<peterdlau...@gmail.com> wrote:
>>
>>> Can anyone tell me roughly how stat.st_size works in order to get the
>>> size of the file? Does it read through the file and count the number
>>> of bytes? Would this take time for a super large file?
>>
>> Implementation dependent. Also device dependent: you have to scan mag tape to
>> find out its length.
Well, as mentioned else-thread, the stat() system call is POSIX, and not
part of the C standard. How it works is "magic" as far as any application
using it is concerned.
> But for paper tape you could use a camera and trigonometry!
It depends... When I used paper tape (yes, I really did), you could have
NUL leader and header columns, and you also had the option of
all-holes-punched columns to allow for fan-fold storage, rather than rolled.
Would these count to the "file" size?
:-)
--
Kenneth Brody