mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
Add file/directory functions to src/system/helpers.cpp
- Required for 'update with settings'
Origin commit data
------------------
Commit: 690786c37c
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2012-10-21 (Sun, 21 Oct 2012)
Origin message was:
------------------
* Add file/directory functions to src/system/helpers.cpp
- Required for 'update with settings'
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user