Returns the size (in bytes) of the file with the given file id.



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

Returns: Real


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.


file = file_bin_open('myfile.bin', 2);
size = file_bin_size(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.

Back: Binary Files
Next: file_bin_position
© Copyright YoYo Games Ltd. 2018 All Rights Reserved