os.remove
Deletes a file
Prototype
ok, message = os.remove (filename)
Description
Deletes the file. On success, returns true.
If it cannot, it returns nil followed by an error message.
If it cannot, it returns nil followed by an error message.
os.remove ("test.txt") --> true
ok, err = os.remove ("test.txt") --> nil, test.txt: No such file or directory
Lua functions
- os.clock - Amount of elapsed/CPU time used (depending on OS)
- os.date - Formats a date/time string
- os.difftime - Calculates a time difference in seconds
- os.execute - Executes an operating system command
- os.exit - Attempts to terminate the process
- os.getenv - Returns an operating system environment variable
- os.rename - Renames a file
- os.setlocale - Sets the current locale to the supplied locale
- os.time - Returns the current time or calculates the time in seconds from a table
- os.tmpname - Returns a name for a temporary file
Topics
- Lua PCRE regular expression functions
- Lua base functions
- Lua bc (big number) functions
- Lua bit manipulation functions
- Lua coroutine functions
- Lua debug functions
- Lua io functions
- Lua math functions
- Lua os functions
- Lua package functions
- Lua script extensions
- Lua string functions
- Lua syntax
- Lua table functions
- Lua utilities
- Scripting callbacks - plugins
- Scripting