Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!cbmvax!mks From: mks@cbmvax.commodore.com (Michael Sinz - CATS) Newsgroups: comp.sys.amiga.tech Subject: Re: Dos Question Keywords: Amigados Message-ID: <9032@cbmvax.commodore.com> Date: 15 Dec 89 13:58:26 GMT References: <1336@becker.UUCP> Reply-To: mks@cbmvax.commodore.com (Michael Sinz - CATS) Organization: Commodore, West Chester, PA Lines: 43 In article <1336@becker.UUCP> douglee@becker.UUCP (Doug Lee) writes: > > quick question for AmigaDOS gurus. While capturing to ram: with my terminal > , I can do a list at any time and get the current size of the file I'm writing > to. When capturing to rad: I get 'empty' for filesize until I close it. Why > do these two devices behave so differently when there is a write lock? > <<>> First, some background: RAM: is a filing system and device all rolled up into one. It is not OFS or NFS or anything else. RAD: is a device that can have a filing system attached to it. (OFS or NFS or ...) Now, with that in mind, let's look at the list command and what it does: The list command basically, (no real details here) will have to do a Examine() on the file and check the file info block. If you check a file that is open, the size displayed is that of what the filing system is reporting from the directory entry. In RAM:, the filing system updates that information every time some data is written. Why not, as it has to keep track of it somewhere anyway and in RAM: it does not take any real time to get at the directory entry. On a floppy or hard disk, you would not want the filing system to write that new information every time there is some data written to the file. (Write a byte, seek to the directory entry, read it, change it, write it...) For this reason, filing systems normally only update such information on close of the file or on certain flush situations. Since RAD: uses a normal filing system, it is the filing system that does not update that value just like on floppies or hard disks. If you want RAD: to update that information, you are always more than welcome to write a new filing system and use that with RAD: >-- >Doug Lee >douglee@becker >416-461-5357 /----------------------------------------------------------------------\ | /// Michael Sinz -- CATS/Amiga Software Engineer | | /// PHONE 215-431-9422 UUCP ( uunet | rutgers ) !cbmvax!mks | | /// | |\\\/// When people are free to do as they please, | | \XX/ they usually imitate each other. | \----------------------------------------------------------------------/