delorie.com/djgpp/doc/libc/libc_388.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

getdfree

Syntax

 
#include <dos.h>

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 */
};

Return Value

None.

Portability

ANSI/ISO C No
POSIX No

Example

 
struct dfree d;
getdfree(3, &d); /* drive C: */


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004