get_file_size


unsigned get_file_size(handle file,
                       unsigned* high)

This function returns the size (in bytes) of the file.

Parameters

handle file

The handle of the file whose size is being queried.

unsigned* high

A pointer to an integer that is updated to contain the high-order 32 bits of the file's size. If this parameter is set to null, it is assumed that the high-order integer is not required and the low-order 32 bit file size is returned instead.

Return

unsigned

An integer containing the low-order 32 bits of the file's size. If an error occurs, 0xffffffff is returned. When 0xffffffff is returned, the function get_last_error may be used to distinguish between the value being part of a valid 64 bit result and it representing an error. When the parameter High is null and 0xffffffff is returned, an error has occurred.

Notes

This function should be called only for a seeking type device. The function get_file_type may be used to ascertain the type of the device.

To obtain the compressed size of a file, see function get_compressed_file_size.