Important: The information in this document is obsolete and should not be used for new development.
DIFormat
To format a disk, you can use theDIFormatfunction.
FUNCTION DIFormat (drvNum: Integer): OSErr;
drvNum- The number of the drive containing the disk to be formatted.
DESCRIPTION
TheDIFormatfunction attempts to format the disk in the drive specified by thedrvNumparameter and returns a result code indicating whether it completed the formatting successfully or failed. Formatting a disk consists of writing special information onto it
so that the disk driver can read from and write to the disk.You can use
DIFormatto format any unlocked disk, including single-sided disks, double-sided disks, high-density disks, and hard disk drives. It formats both sides
of a double-sided disk.You have to unmount a disk before calling the
DIFormatfunction.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for DIFormat are
Trap macro Selector _Pack2 $0006 SPECIAL CONSIDERATIONS
You should not callDIFormatat interrupt time.RESULT CODES
noErr 0 No error volOnLinErr -55 Volume is online lastDskErr -64 Last of the range of low-level disk errors ... firstDskErr -84 First of the range of low-level disk errors