I'm trying to remove non-empty directory in Lua but without success,
I tried the following:
os.remove(path_to_dir)
And got the error: Directory not empty 39
When 39 is the number of files in path_to_dir
Also tried:
require ('lfs')
lfs.rmdir(path_to_dir)
And got the error: Directory not empty'
Worth to mention that I did chmod -R a+rX *
to path_to_dir
Thanks for the help.