Skip to Main Content Skip to Search
Product Documentation

diskinfo - Type definition for file system disk information structure

Prototype

typedef struct {
   char          Label[12];
   char          DriveLetter;
   char          Reserved[3];
   unsigned int  SerialNumber;
   unsigned int  FirstPhysicalSector;
   unsigned int  FATType;
   unsigned int  FATCount;
   unsigned int  MaxDirEntries;
   unsigned int  BytesPerSector;
   unsigned int  SectorsPerCluster;
   unsigned int  TotalClusters;
   unsigned int  BadClusters;
   unsigned int  FreeClusters;
   unsigned int  Files;
   unsigned int  FileChains;
   unsigned int  FreeChains;
   unsigned int  LargestFreeChain;
} diskinfo; 

Arguments

Label

This value contains the zero-terminated string that contains the volume label. The string is empty if the volume has no label.

DriveLetter

This value contains the drive letter, in uppercase.

Reserved

Reserved.

SerialNumber

This value contains the volume serial number.

FirstPhysicalSector

This value contains the logical block addressing (LBA) address of the logical drive boot record. For 3.5-inch disks, this value is 0.

FATType

This value contains the type of file system found. It can contain 12 , 16 , or 32 for FAT-12, FAT-16, or FAT-32 volumes, respectively.

FATCount

This value contains the number of FAT partitions on the volume.

MaxDirEntries

This value contains the size of the root folder. For FAT-32 systems, this value is 0.

BytesPerSector

This value contains the sector size. This value is most likely to be 512.

SectorsPerCluster

This value contains, in sectors, the size of the smallest unit of storage that can be allocated to a file.

TotalClusters

This value contains the number of file storage clusters on the volume.

BadClusters

This value contains the number of clusters that have been marked as bad. These clusters are unavailable for file storage.

FreeClusters

This value contains the number of clusters that are currently available for storage.

Files

This value contains the number of files, including directories, on the volume. This number excludes the root folder and files that have an allocated file size of 0.

FileChains

This value contains the number of contiguous cluster chains. On a completely unfragmented volume, this value is identical to the value of Files.

FreeChains

This value contains the number of contiguous cluster chains of free clusters. On a completely unfragmented volume, this value is 1.

LargestFreeChain

This value contains the maximum allocated file size, in number of clusters, for a newly allocated contiguous file. On a completely unfragmented volume, this value is identical to FreeClusters.

Description

The diskinfo structure contains information for file system disks.

See Also

API function xPCFSDiskInfo

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS