MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / FileReader

Method FileReader

DebugView++Lib/FileReader.cpp:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace debugviewpp {
18
19FileReader::FileReader(Timer& timer, ILineBuffer& linebuffer, FileType::type filetype, const std::wstring& filename) :
20 LogSource(timer, SourceType::File, linebuffer),
21 m_end(false),
22 m_filename(Str(filename).str()),
23 m_fileType(filetype),
24 m_name(Str(std::experimental::filesystem::path(filename).filename().string()).str()),
25 m_handle(FindFirstChangeNotification(std::experimental::filesystem::path(m_filename).parent_path().wstring().c_str(), false, FILE_NOTIFY_CHANGE_SIZE)), //todo: maybe adding FILE_NOTIFY_CHANGE_LAST_WRITE could have benefits, not sure what though.
26 m_ifstream(m_filename, std::ios::in),
27 m_filenameOnly(std::experimental::filesystem::path(m_filename).filename().string()),
28 m_initialized(false)
29{
30 SetDescription(filename);
31}
32
33FileReader::~FileReader()
34{

Callers

nothing calls this directly

Calls 3

StrClass · 0.85
strMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected