M MY Multiplayer: Wiki
Side
Kind

fileDelete

Shared

Deletes a file of the calling resource.

bool fileDelete(string path)

Parameters

NameTypeDescription
pathstringA path inside the calling resource.

Returns

true if the file was deleted; false if it does not exist, is a folder or could not be deleted.

A path may not contain .., \ or :, nor start with /. Another resource's files can only be read; an invalid path logs a warning and the function returns false.

Example

if fileExists("cache.json") then
    fileDelete("cache.json")
end

See also