Garry's Mod Wiki

Garry's Mod Wiki

  boolean file.Delete( string name, string path = nil )

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 = nil
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.

Returns

1 boolean success
This was recently added in version (2024.06.17). It might only be available on the Dev Branch right now.

Example

Deletes data/helloworld.txt file.

file.Delete( "helloworld.txt" )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...