Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uwm.edu!linac,att!emory!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!jwright From: Julian.Wright@comp.vuw.ac.nz (John Julian Wright) Newsgroups: comp.sys.acorn Subject: Re: Free space Keywords: free space Message-ID: <1991Mar18.231818.10508@comp.vuw.ac.nz> Date: 18 Mar 91 23:18:18 GMT References: <7151@ecs.soton.ac.uk> Sender: news@comp.vuw.ac.nz (News Admin) Organization: Computer Science, Victoria University, Wellington, NewZealand Lines: 41 Nntp-Posting-Host: makara.comp.vuw.ac.nz Originator: jwright@makara.comp.vuw.ac.nz In article <7151@ecs.soton.ac.uk>, snb90@uk.ac.soton.ecs (Stewart Brodie) writes: |> Would it be possible to have 'Disc Free Space' (or just 'Free' |> even) |> on the Filer menu rather than leave it to the individual filers to |> provide a free space utility? I think the problem there is that there is currently no call (that I am aware of) that accepts as a parameter a pathname and returns the free space remaining for that path, that works for all existing and future filing systems. The existing calls to determine free space require that the application either: 1) Know the filing system's private word, in order to call FileCore_FreeSpace or 2) Know the filing system's SWI prefix, in order to call FSPrefix_FreeSpace, which in turn calls FileCore_FreeSpace. (1) is plainly undesirable. (2) is clumsy, as there is no way of knowing what the SWI prefix for a new, as-yet-unwritten FS is. VKiller suffered from this problem a while ago when guessing the prefix for SCSIFS and getting it wrong :-( It IS possible to _display_ the free space for a given path... you extract the FS name from the path (eg. "adfs:") and put it in front of a call to 'free' ie *adfs:free :0 but this is of little use to programs which want to place the free space in a numeric variable... I have searched the PRMs for the appropriate call but as yet without success, which leads me to believe that it doesn't yet exist. If it does, somebody please tell me about it... Cheers, Julian.