mirror of
https://github.com/znc/znc.git
synced 2026-07-06 18:01:21 +02:00
Some more tabs and cleanup
There was some code in FileUtils.h which was added in r232 (in 2005) to znc. It was already commented out back then which means it is commented out for 5 years already. I'm 99% sure we can safely remove that. :P git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1965 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
-40
@@ -160,46 +160,6 @@ public:
|
||||
return FillByWildcard(sDir, "*");
|
||||
}
|
||||
|
||||
/* static bool Create(const CString& sDir, mode_t mode = 0755) {
|
||||
VCCString vSubDirs = sDir.split("[/\\\\]+");
|
||||
CCString sCurDir;
|
||||
|
||||
for (unsigned int a = 0; a < vSubDirs.size(); a++) {
|
||||
sCurDir += vSubDirs[a] + "/";
|
||||
if ((!CDir::Exists(sCurDir)) && (mkdir(sCurDir.c_str(), mode) != 0)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int FillByRegex(const CCString& sDir, const CCString& sRegex, const CCString& sFlags = "") {
|
||||
CleanUp();
|
||||
DIR* dir = opendir((sDir.empty()) ? "." : sDir.c_str());
|
||||
|
||||
if (!dir) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dirent * de;
|
||||
|
||||
while ((de = readdir(dir)) != 0) {
|
||||
if ((strcmp(de->d_name, ".") == 0) || (strcmp(de->d_name, "..") == 0)) {
|
||||
continue;
|
||||
}
|
||||
if ((!sRegex.empty()) && (!CCString::search(de->d_name, sRegex, sFlags))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
CFile *file = new CFile(sDir, de->d_name, this);
|
||||
push_back(file);
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
return size();
|
||||
}*/
|
||||
|
||||
int FillByWildcard(const CString& sDir, const CString& sWildcard) {
|
||||
CleanUp();
|
||||
DIR* dir = opendir((sDir.empty()) ? "." : sDir.c_str());
|
||||
|
||||
Reference in New Issue
Block a user