Date : Tue, 20 Dec 1983 05:26:45-PST (Tue)
From : hplabs!hao!seismo!rlgvax!cvl!umcp-cs!aplvax!ded@ucb-vax
Subject: Determining free disk space
One of these days I'll learn to state my question clearly. I asked
for a way to determine how much free space is available on a disk
in a CP/M environment. Several nice people resonded with STAT.COM,
XDIR.COM, etc. Ah, they were right, but I had meant to ask something
different.
I want to determine free disk space from the confines of an application
program -- through a BDOS call, or some other portable method. So
when my programs are going to write to disk, they can first check
if enough space if available. One of the major flaws of CP/M is that
when things start to go wrong...you're done for. I would like to avoid
that if all possible. I could read every directory entry and determine
through some simple mathematics how much space is available, but I would
prefer something more elegant.
--
Don Davis
JHU/APL
...decvax!harpo!seismo!umcp-cs!aplvax!ded
...rlgvax!cvl!umcp-cs!aplvax!ded