Garry's Mod Wiki

file.Delete

  file.Delete( string name, string path )

Description

Deletes a file or empty folder that is relative to the data folder. You can't remove any files outside of data folder.

You are able to delete any file in the Menu state.

Arguments

1 string name
The file name.
2 string path
The path to look for the files and directories in. See this list for a list of valid paths.
This is only available in the menu state.

Example

Deletes data/helloworld.txt file.

file.Delete( "helloworld.txt" )