Carbon


FSVolumeInfo

Header: Files.h

Used when getting or setting information about a volume.

struct FSVolumeInfo {
    UTCDateTime createDate; 
    UTCDateTime modifyDate; 
    UTCDateTime backupDate; 
    UTCDateTime checkedDate; 
    UInt32 fileCount; 
    UInt32 folderCount; 
    UInt64 totalBytes; 
    UInt64 freeBytes; 
    UInt32 blockSize; 
    UInt32 totalBlocks; 
    UInt32 freeBlocks; 
    UInt32 nextAllocation; 
    UInt32 rsrcClumpSize; 
    UInt32 dataClumpSize; 
    UInt32 nextCatalogID; 
    UInt8 finderInfo[32]; 
    UInt16 flags; 
    UInt16 filesystemID; 
    UInt16 signature; 
    UInt16 driveNumber; 
    SInt16 driverRefNum;
};
typedef FSVolumeInfo FSVolumeInfoPtr;

Field descriptions

createDate

The date and time the volume was created.

modifyDate

The last time when the volume was modified in any way.

backupDate

Indicates when the volume was last backed up. This field is for use by backup utilities.

checkedDate

The last date /time that the volume was checked for consistency.

fileCount

The total number of files on volume.

folderCount

The total number of folders on volume. Note that no root directory counts.

totalBytes

The size of the volume in bytes.

freeBytes

The size of the free space on the volume in bytes.

blockSize

The size of an allocation block, in bytes. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and will set some or all of these fields to zero.

totalBlocks

The total number of allocation blocks on the volume. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and will set some or all of these fields to zero.

freeBlocks

The number of unused allocation blocks on the volume. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and will set some or all of these fields to zero.

nextAllocation

The nextAllocation field is a hint for where to start searching for free space during an allocation. This field is only appropriate for volume formats (such as HFS and HFS Plus) that allocate space in fixed-size pieces; other volume formats may not have a similar concept, and will set some or all of these fields to zero.

rsrcClumpSize

Default resource fork clump size. When a fork is automatically grown as it is written, the File Manager attempts to allocate space that is a multiple of the clump size. This field is zero for volume formats that don’t support the notion of a clump size.

dataClumpSize

Default data fork clump size. When a fork is automatically grown as it is written, the File Manager attempts to allocate space that is a multiple of the clump size. This field is zero for volume formats that don’t support the notion of a clump size.

nextCatalogID

The next unused catalog node ID. Some volume formats (such as HFS and HFS Plus) use a monotonically increasing number for the catalog node ID (i.e. File ID or Directory ID) of newly created files and directories. For those volume formats, the nextCatalogID is the next file/directory ID that will be assigned. For other volume formats, this field will be zero.

finderInfo

Information used by Finder, such as the Directory ID of the System Folder. Some volume formats do not support Finder info for a volume and will set this field to all zeroes.

flags

This field contains bit flags about the volume.

filesystemID

Identifies the filesystem implementation that is handling the volume; this is zero for HFS and HFS Plus volumes.

signature

This field is used to distinguish between volume formats supported by a single filesystem implementation.

driveNumber

The drive number for the drive (drive queue element) associated with the volume.

driverRefNum

The driver reference number for the drive (drive queue element) associated with the volume.

Information about a volume’s root directory would use the FSCatalogInfo type.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)