file_bin_size

Syntax:

file_bin_size(binfile);


Argument Description
binfile The ID of the file to get the size of.


Returns: Real


Description

This function will return the size (in bytes) of a file that has been opened for reading and/or writing. The File ID is the value returned by the function file_bin_open().

NOTE: These functions do not work when the target module is HTML5.


Example:

file = file_bin_open('myfile.bin', 2);
size = file_bin_size(file);
file_bin_close(file);

This would open a file from the local directory of the game, and assign its index to the variable "file". It would then get the size of that file and close it again.