Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
LogFolder Class Reference
Inheritance diagram for LogFolder:

Protected Member Functions

void SetUp () override
void TearDown () override
void Touch (const wchar_t *name)
DWORD Newest ()

Protected Attributes

fs::path m_folder

Detailed Description

Definition at line 9 of file Test_PanoLog.cpp.

Member Function Documentation

◆ Newest()

DWORD LogFolder::Newest ( )
inlineprotected

Definition at line 23 of file Test_PanoLog.cpp.

23 {
24 return NewestLogFileNumber(m_folder.wstring() + L"\\", L"pano", L".log");
25 }
fs::path m_folder
DWORD NewestLogFileNumber(const std::wstring &folder, const std::wstring &base, const std::wstring &ext)
The number of the newest log file in a folder: 0 for base.ext (or when there is none),...
Definition pano_log.cpp:33

References m_folder, and NewestLogFileNumber().

◆ SetUp()

void LogFolder::SetUp ( )
inlineoverrideprotected

Definition at line 11 of file Test_PanoLog.cpp.

11 {
12 m_folder = fs::temp_directory_path() / ("Test_PanoLog_" + std::to_string(GetCurrentProcessId()) +
13 "_" + ::testing::UnitTest::GetInstance()->current_test_info()->name());
14 fs::remove_all(m_folder);
15 fs::create_directories(m_folder);
16 }

References m_folder.

◆ TearDown()

void LogFolder::TearDown ( )
inlineoverrideprotected

Definition at line 17 of file Test_PanoLog.cpp.

17 {
18 fs::remove_all(m_folder);
19 }

References m_folder.

◆ Touch()

void LogFolder::Touch ( const wchar_t * name)
inlineprotected

Definition at line 20 of file Test_PanoLog.cpp.

20 {
21 std::ofstream(m_folder / name).put('x');
22 }

References m_folder.

Member Data Documentation

◆ m_folder

fs::path LogFolder::m_folder
protected

Definition at line 26 of file Test_PanoLog.cpp.

Referenced by Newest(), SetUp(), TearDown(), and Touch().


The documentation for this class was generated from the following file: