26 lines
741 B
C
26 lines
741 B
C
|
|
#ifndef CCFileOutStream_H
|
||
|
|
#define CCFileOutStream_H
|
||
|
|
#include "CC.h"
|
||
|
|
|
||
|
|
using CCOutStream = std::ofstream;
|
||
|
|
class CCFileOutStream:public CCOutStream
|
||
|
|
{
|
||
|
|
private:
|
||
|
|
inline static std::mutex M_mutexs;
|
||
|
|
public:
|
||
|
|
using std::ofstream::basic_ofstream;
|
||
|
|
CCFileOutStream() = default;
|
||
|
|
CCFileOutStream(CTL::String Path,openmode mode);
|
||
|
|
static void WriteFile(const CTL::String& filename, const CTL::String& content,openmode mode = std::ios::out | std::ios::binary);
|
||
|
|
static void Append(const CTL::String& filename, const std::vector<char>& data,openmode mode = std::ios::app | std::ios::binary);
|
||
|
|
static void Append(const CTL::String& filename, CTL::String data,openmode mode = std::ios::app | std::ios::binary);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
private:
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
#endif
|