use CFileHelpers::copyFile instead of own function; cleanup helpers

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6d01d59b53
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-11 (Thu, 11 Aug 2016)

Origin message was:
------------------
- use CFileHelpers::copyFile instead of own function; cleanup helpers

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-08-11 13:52:49 +02:00
parent b854975881
commit ec73df296a
6 changed files with 15 additions and 50 deletions

View File

@@ -1110,44 +1110,7 @@ std::string Lang2ISO639_1(std::string& lang)
}
//NI
bool File_copy(std::string rstr, std::string wstr)
{
char * buffer;
long size;
std::ifstream infile(rstr.c_str(), std::ifstream::binary);
if (infile)
{
std::ofstream outfile(wstr.c_str(), std::ofstream::binary);
if (outfile)
{
// get size of file
infile.seekg(0,std::ifstream::end);
size=infile.tellg();
infile.seekg(0);
buffer = new char [size];
infile.read (buffer,size);
outfile.write (buffer,size);
delete[] buffer;
outfile.close();
}
else
{
return false;
}
infile.close();
return true;
}
else
{
return false;
}
}
// rreturns the pid of the first process found in /proc
// returns the pid of the first process found in /proc
int getpidof(const char *process)
{
DIR *dp;