/*
-- strFilePath - 文件路径
-- bIsBinary -是否为二进制文件读取方式
*/
bool outAllFile(const string& strFilePath, const string& strSrc, const unsigned int& uMode, const bool& bIsBinary) const
{
if (uMode & std::ios::in) return false;
createFolderForPath(strFilePath);
ofstream outFile;
if (bIsBinary || (uMode&std::ios::binary))
{
outFile.open(strFilePath, uMode | std::ios::out | std::ios::binary);
if (!outFile.is_open()) return false;
outFile.write(strSrc.c_str(), strSrc.size());
}
else
{
outFile.open(strFilePath, uMode);
if (!outFile.is_open()) return false;
outFile << strSrc;
}
outFile.close();
return true;
}