C
Description
The FILECreateHeadCluster function will create the first cluster of a file. First, it will find an empty cluster with the FATfindEmptyCluster function and mark it as the last cluster in the file. It will then erase the cluster using the EraseCluster function.
Preconditions
This function should not be called by the user.
Parameters
Parameters |
Description |
fo |
Pointer to file structure |
cluster |
Cluster location |
Return Values
Return Values |
Description |
CE_GOOD |
File closed successfully |
CE_WRITE_ERROR |
Could not write to the sector |
CE_DISK_FULL |
All clusters in partition are taken |
Side Effects
None
Remarks
None.