file_bin_rewrite

Re-writes the given file.

Syntax:

file_bin_rewrite(binfile);


Argument Description
binfile The ID of the file to rewrite.


Returns: N/A


Description

This function takes the filename handle as returned by the function file_bin_open and then rewrites the file, clearing it of all previous data to start writing from the beginning of the file.

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


Example:

file = file_bin_open('myfile.bin', 2);
file_bin_rewrite(file);

This would open a file from the same directory as the game, and assign its index to the variable "file". It would then re-write the file (clearing it of data).


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