Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: when is a block not a block? Message-ID: <6321@sugar.hackercorp.com> Date: 9 Aug 90 23:17:02 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> <10797@wehi.dn.mu.oz> ked01@JUTS.ccc.amdahl.com (Kim DeVaughn) writes: > While I understand that other such "oddities" may well arise in the future, > what bothers me is not being able to ask the filesystem for the *true* info > in a supported way. *which* filesystem? OFS, FFS, ram.handler, and network file systems all have different amounts of overhead for a file. When you copy a file from FFS to OFS it grows by 512/448ths right off the bat. How do we figure that? You need a call "RealSize(fs, nbytes)" to figure the real size of a file. That might depend on what *directory* it's being moved into, if extra blocks need to be allocated. Make it "RealSize(dir, nbytes)". OK, now we just need to know the free space on a device. How do you figure free space in RAM:? How about NFS:? Sigh. Make a guess and punt, leaving space for slop. -- Peter da Silva. `-_-' .