mirror of
https://github.com/znc/znc.git
synced 2026-05-09 06:44:40 +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());
|
||||
|
||||
+6
-6
@@ -30,14 +30,14 @@ using std::pair;
|
||||
class CString;
|
||||
class MCString;
|
||||
|
||||
typedef set<CString> SCString;
|
||||
typedef set<CString> SPair;
|
||||
typedef set<CString> SCString;
|
||||
typedef set<CString> SPair;
|
||||
|
||||
typedef vector<CString> VCString;
|
||||
typedef vector<pair<CString, CString> > VPair;
|
||||
typedef vector<CString> VCString;
|
||||
typedef vector<pair<CString, CString> > VPair;
|
||||
|
||||
typedef list<CString> LCString;
|
||||
typedef list<pair<CString, CString> > LPair;
|
||||
typedef list<CString> LCString;
|
||||
typedef list<pair<CString, CString> > LPair;
|
||||
|
||||
static const unsigned char XX = 0xff;
|
||||
static const unsigned char base64_table[256] = {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#endif
|
||||
|
||||
// Redefine some Csocket debugging mechanisms to use znc's
|
||||
#define CS_DEBUG(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f)
|
||||
#define PERROR(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f << ": " << strerror(GetSockError()))
|
||||
#define CS_DEBUG(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f)
|
||||
#define PERROR(f) DEBUG(__FILE__ << ":" << __LINE__ << " " << f << ": " << strerror(GetSockError()))
|
||||
|
||||
|
||||
#endif // !_DEFINES_H
|
||||
|
||||
Reference in New Issue
Block a user