Article View: comp.sys.amiga.tech
Article #4732Re: when is a block not a block?
From: Michael Sinz - CATS
Date: Mon, 06 Aug 1990 11:54
Date: Mon, 06 Aug 1990 11:54
35 lines
2509 bytes
2509 bytes
In article <10797@wehi.dn.mu.oz> BAXTER_A@wehi.dn.mu.oz writes:
[lots of other stuff deleted]
>You know how big the space is, yes? So you want to know how big the file is.
>Copy it to Nil:/Null: and cout the bytes on the way. It will be quick enough
>to not make much difference (Unless the file is enormous, in which case, you
>will have some idea of if it will fit :-)
Or you can just seek to the end of the file with OFFSET_END and then find
the size... (Why copy it) Or you could get the information by doing an
Examine() on the file. The real question here is how to figure out if a file
will fit on a device. This can not be done without trying. That is, the
device may be running a filing system that uses different allocation units
or block sizes etc. Plus the system, being multi-tasking, could end up using
some of the space while you are writing the file. (Some other application also
writing a file) and thus mess you up. The only real method is to try the copy
and see if it worked.
>Regards Alan>
>> --
>> UUCP: kim@uts.amdahl.com -OR- ked01@juts.ccc.amdahl.com
>> or: {sun,decwrl,hplabs,pyramid,uunet,oliveb,ames}!amdahl!kim
>> DDD: 408-746-8462
>> USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086
>> BIX: kdevaughn GEnie: K.DEVAUGHN CIS: 76535,25
/----------------------------------------------------------------------\
| /// Michael Sinz -- CATS/Amiga Software Engineer |
| /// PHONE 215-431-9422 UUCP ( uunet | rutgers ) !cbmvax!mks |
| /// |
|\\\/// Quantum Physics: The Dreams that Stuff is made of. |
| \XX/ |
\----------------------------------------------------------------------/
Technical Details
Message-ID:
<13627@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!usc!snorkelwacker!mit-eddie!rutgers!cbmvax!mksReferences:
<6498.269a4527@vax1.tcd.ie> <648H02l0b8KM01@amdahl.uts.amdahl.com> <13237@cbmvax.commodore.com> <3fco02lsb9LE01@amdahl.uts.amdahl.com> <13342@cbmvax.commodore.com> <c4pK02n=01EQ01@JUTS.ccc.amdahl.com> <10797@wehi.dn.mu.oz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!usc!snorkelwacker!mit-eddie!rutgers!cbmvax!mks From: mks@cbmvax.commodore.com (Michael Sinz - CATS) Newsgroups: comp.sys.amiga.tech Subject: Re: when is a block not a block? Message-ID: <13627@cbmvax.commodore.com> Date: 6 Aug 90 11:54:25 GMT References: <6498.269a4527@vax1.tcd.ie> <648H02l0b8KM01@amdahl.uts.amdahl.com> <13237@cbmvax.commodore.com> <3fco02lsb9LE01@amdahl.uts.amdahl.com> <13342@cbmvax.commodore.com> <c4pK02n=01EQ01@JUTS.ccc.amdahl.com> <10797@wehi.dn.mu.oz> Reply-To: mks@cbmvax (Michael Sinz - CATS) Organization: Commodore, West Chester, PA Lines: 35