ES2.Delete
Parameters
path | The Path of the file, folder or data we want to delete. Path can be a file, folder or tag. |
settings |
Optional. A user-created ES2Settings object containing options not specified in path. |
Description
Deletes the data at the specified path. This path can be a file, folder or a tag.
If deleting a folder, it will also delete all files and folders within that folder.
Note: You cannot delete folders when using Web Player or PlayerPrefs.
Note: You cannot delete from Resources.
C#
1 2 3 4 |
/* Check that a file named 'myFile.txt' contains a tag named 'myPosition' before deleting it. */ if(ES2.Exists("myFile.txt?tag=myPosition")) ES2.Delete("myFile.txt?tag=myPosition"); |
JS
1 2 3 4 |
/* Check that a file named 'myFile.txt' contains a tag named 'myPosition' before deleting it. */ if(ES2.Exists("myFile.txt?tag=myPosition")) ES2.Delete("myFile.txt?tag=myPosition"); |