Path: 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 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)