* Add file/directory functions to src/system/helpers.cpp

- Required for 'update with settings'
This commit is contained in:
micha-bbg
2012-10-21 17:50:04 +02:00
parent ec35f80220
commit 690786c37c
2 changed files with 251 additions and 0 deletions

View File

@@ -34,4 +34,26 @@ int check_dir(const char * dir);
bool get_fs_usage(const char * dir, long &total, long &used);
bool get_mem_usage(unsigned long &total, unsigned long &free);
std::string trim(std::string &str, const std::string &trimChars = " \n\r\t");
class CFileHelpers
{
private:
int FileBufSize;
char *FileBuf;
int fd1, fd2;
public:
CFileHelpers();
~CFileHelpers();
static CFileHelpers* getInstance();
bool doCopyFlag;
bool copyFile(const char *Src, const char *Dst, mode_t mode);
bool copyDir(const char *Src, const char *Dst);
bool createDir(const char *Dir, mode_t mode);
bool removeDir(const char *Dir);
};
#endif