int GetFileSize (char fileName[], long *fileSize);
Gets the size of a file, in bytes.
![]() |
Note Windows SDK also contains a GetFileSize function. If you include windows.h and do not include utility.h, you will receive compile errors if you call the GetFileSize function. |
/* Get the size of WAVEFORM.DAT. */
long size;
if (GetFileSize ("WAVEFORM.DAT",&size) == 0)
FmtOut ("The size of WAVEFORM.DAT is %i[b4]",size);
Input | ||
Name | Type | Description |
fileName | string | The pathname of the file. If you specify an empty string "", GetFileSize gets the file size found by the most recent call to GetFirstFile or GetNextFile. |
Output | ||
Name | Type | Description |
fileSize | long | Size of the file in bytes. |
Name | Type | Description | ||||||||||||||
result | integer | The result of the call.
|