static File.Delete(string filename)
Deletes the specified file from the disk.
This command only works with files in the game directory.
You CANNOT use a path, so any filename with "" or "/" in it will
automatically be rejected, for security reasons.
The only exception to this rule is the special tag $SAVEGAMEDIR$, which allows
you to access files in the save game directory. This is especially important with
the move to Windows Vista, in which you may not have access to the main game folder.
NOTE: This is a static function, therefore you don't need an open File pointer
to use it. See the example below.
Example:
File.Delete("temp.tmp");
will delete the file "temp.tmp" from the game directory, if it exists.
Compatibility: Supported by AGS 3.0.1 and later versions.
See Also: File.Exists, File.Open
|