mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Remove some code duplications and move functions into classes
This removes ReadFile(), WriteFile(), ReadLine(), Lower() and Upper() from Utils.h and adds CFile::ReadFile(). The biggest part of this patch fixes modules to use CFile and CString instead of these global functions. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1311 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -112,6 +112,7 @@ public:
|
||||
bool Open(int iFlags, mode_t iMode = 0644);
|
||||
int Read(char *pszBuffer, int iBytes);
|
||||
bool ReadLine(CString & sData, const CString & sDelimiter = "\n");
|
||||
bool ReadFile(CString& sData, size_t iMaxSize = 512 * 1024);
|
||||
int Write(const char *pszBuffer, u_int iBytes);
|
||||
int Write(const CString & sData);
|
||||
void Close();
|
||||
|
||||
Reference in New Issue
Block a user