Directory:remove() method

Deletes the folder physically on the disk if the folder is empty.

Return value

Returns true if the operation succeeded or false otherwise (in case of an non empty folder for example).

Example

-- outputs false, the current working directory could not be deleted ! print(sys.Directory(sys.currentdir):remove())