Borland C++ reference

getfatd

raw OCR

Gets file allocation table information.

Defined in header <dos.h>

Syntax

#include <dos.h>
void getfatd(struct fatinfo *dtable);

Portability

DOSUNIXWindowsANSI CC++ only
■■

Remarks

getfatd gets information from the file allocation table (FAT) of the default drive, dtable points to the fatinfo structure to be filled in. The fatinfo structure filled in by getfatd is defined as follows:

struct fatinfo {

char fi_sclus;/* sectors per cluster */
char fi_fatid;/* the FAT id byte V
int fi_nclus;/* number of clusters */
int fi_bysec; };/* bytes per sector */

Return value

None.

See also

Example

include  <stdio.h>
#include <dos.h>
int mainO
{
   struct fatinfo  diskinfo;
   /* get default  drive information
   getfatd (Scdiskinfo) ;
   printf ("\nDefault Drive:\n");
   printf ("sectors per cluster: %5d\n" ,diskinfo.fi_sclus);
   printf ("FAT ID byte:         %5X\n",diskinfo. fi_fatid & 0xFF)
   printf ("number of clusters   %5d\n" ,diskinfo.fi_nclus);
   printf ("bytes per sector.    %5d\n",diskinfo. fi_bYsec);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.