Mail Archives: djgpp/1997/09/14/14:57:57
On Fri, 12 Sep 1997, Deltaman wrote:
> Are there any ways to see how much _total_ diskspace a harddrive has
> (both free and used)? I found a function that can tell how much _free_
> diskspace is available (getdfree), but it is not what I wanted.
It seems that you have missed the docs. The documentation of
`getdfree' clearly tells that you get both free and total space:
void getdfree(unsigned char drive, struct dfree *ptr);
Description
-----------
This function gets information about the size and fullness of the given
drive (0=default, 1=A:, etc). The return structure is as follows:
struct dfree {
unsigned df_avail; /* number of available clusters */
unsigned df_total; /* total number of clusters */
unsigned df_bsec; /* bytes per sector */
unsigned df_sclus; /* sectors per cluster */
};
- Raw text -