This function deletes a file.
Parameter | Description |
---|---|
path | file path to delete |
Returns true if the file was successfully deleted.
path = GetPath(PATH_DOCUMENTS) .. "/temp.bin"
CreateFile(path)
if FileType(path) ~= 1 then
print("Failed to write file.")
return
end
print("File created.")
OpenDir(path)
Sleep(3000)
if DeleteFile(path) then
print("File deleted.")
else
print("Failed to delete file.")
end