lua_filehelpers.cpp: Add lua script function 'rmdir()'

- Set Lua api version to 1.51


Origin commit data
------------------
Branch: ni/coolstream
Commit: 631708f380
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-09-04 (Sun, 04 Sep 2016)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2016-09-04 20:56:11 +02:00
parent 1265abe390
commit ac62dcec55
4 changed files with 40 additions and 2 deletions

View File

@@ -910,13 +910,16 @@ bool CFileHelpers::createDir(string& Dir, mode_t mode)
bool CFileHelpers::removeDir(const char *Dir)
{
CFileHelpers* fh = CFileHelpers::getInstance();
fh->clearDebugInfo();
DIR *dir;
struct dirent *entry;
char path[PATH_MAX];
dir = opendir(Dir);
if (dir == NULL) {
printf("Error opendir()\n");
fh->setDebugInfo("Error opendir().", __path_file__, __func__, __LINE__);
fh->printDebugInfo();
return false;
}
while ((entry = readdir(dir)) != NULL) {