🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4313

when is a block not a block?

#4313
From: cpmurphy
Date: Tue, 10 Jul 1990 21:14
20 lines
1705 bytes
   I'm working on a project with a friend which involves, inter alia, writing
files to and from disks. We've written a few small things just to cut our teeth
on the Amiga, as it were. So I had a good look at the new 'ls' program that was
in comp.sources.amiga recently. There I was alarmed to see that there is a bug
in 1.3 to do with file blocks. Apparently using Examine() or ExNext() with a
FileInfoBlock structure will not always give the correct number of blocks taken
up by a file. The way to get around it, so it says, is to use Info().
  I'm a little bit confused by all of this. Could someone please enlighten me.
How do I get the "real" number of blocks taken up by a file so as to avoid this
bug? Say I have a file on a HD and I want to copy it to a floppy. How do I
ensure that there is enough space on the floppy for this file? Is it to convert
it's size in bytes to "floppy blocks", then compare it to the Info() from the
floppy? Or is there an overhead involved (some code I've seen implies there is).
  Thank you for yor help and your patience.
-- 
--------------------------------------------------------------------------------
Christian Murphy, Trinity College, Dublin, Ireland	cpmurphy@vax1.tcd.ie
cpmurphy%vax1.tcd.ie@cunyvm.cuny.edu (from ignorant internet sites)
...uunet!mcsun!ukc!swift.cs.tcd.ie!vax1.tcd.ie!cpmurphy (same path as news)
Technical Details
Message-ID: <6498.269a4527@vax1.tcd.ie>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!vax1.tcd.ie!cpmurphy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!tcdcs!swift.cs.tcd.ie!vax1.tcd.ie!cpmurphy
From: cpmurphy@vax1.tcd.ie
Newsgroups: comp.sys.amiga.tech
Subject: when is a block not a block?
Message-ID: <6498.269a4527@vax1.tcd.ie>
Date: 10 Jul 90 21:14:15 GMT
Organization: Computer Laboratory, Trinity College Dublin
Lines: 20