删除文件


描述

With this action you can delete a file that has been created previously. You supply the file name (as a string) of the file to be deleted. Note that you cannot delete any files that are included in the game bundle, only those that have been created using the Close Ini or Save Buffer actions (see the section on The File System for more information).


动作语法:

Delete File Syntax


参数:

参数 描述
文件名 The name (as a string) of the file to delete


例如:

Delete File Example
The above action block code will check to see if the file "checkpoint.sav" exists, and if it does it then checks to see if the file "checkpoint_OLD.sav" exists. If that file exists as well, then it is deleted, and then the original "checkpoint.sav" file is renamed to "checkpoint_OLD.sav". Finally a buffer is saved as "checkpoint.sav" (essentially we are backing up a saved buffer file each time we save it, so that there is always a "current" save and an "old" save file).