TextWriter * CreateDataTextFile(const TCHAR *name, bool append) { assert(name != nullptr); assert(!StringIsEmpty(name)); const auto path = LocalPath(name); TextWriter *writer = new TextWriter(path, append); if (writer == nullptr) return nullptr; if (!writer->IsOpen()) { delete writer; return nullptr; } return writer; }
bool IsOpen() const { return file.IsOpen(); }