Available since Version 1.0.
Deletes a file at the specified path.
Syntax
File.Delete( path, content )Arguments
- path (string): The path of the file to delete.
Return Values
- (boolean): Returns true if the file was deleted successfully, or false if an error occurred (e.g., if the path is invalid).
Examples
local result = File.Delete("path/to/file.txt")
if result then
print("File deleted successfully!")
else
print("Failed to delete file.")
end