file_bin_close

关闭先前打开的二进制文件。提供文件 ID 值,由函数 file_bin_open() 返回。

The function will return true if the operation was a success, however if there was a failure in closing the file or when the file was first opened, this will return false.

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

 

语法:

file_bin_close(binfile);

参数类型描述
binfileBinary File ID要关闭的文件的 ID。

 

返回:

Boolean

 

例子:

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

这将从与游戏相同的目录中打开一个文件,并将其索引分配给变量“ file”。然后它将重写文件 (清除数据) ,并再次关闭它。