KiCad PCB EDA Suite
Loading...
Searching...
No Matches
file_utils.cpp File Reference
#include "qa_utils/file_utils.h"
#include <cstdio>
#include <filesystem>
#include <stdexcept>
#include <string>
#include <wx/ffile.h>
#include <wx/filefn.h>
#include <wx/filename.h>
#include <wx/tokenzr.h>
#include <wx/utils.h>
#include <wx_filename.h>
#include <settings/settings_manager.h>
#include <wildcards_and_files_ext.h>

Go to the source code of this file.

Functions

static void reportTempDir (const wxString &aMessage)
 Report a message about a temporary directory.
 
static bool shouldKeepTemp (const std::filesystem::path &aPath, const wxString &aKeepEnvValue)
 
static std::filesystem::path createTempDir (const wxString &aPrefix)
 

Function Documentation

◆ createTempDir()

static std::filesystem::path createTempDir ( const wxString & aPrefix)
static

Definition at line 82 of file file_utils.cpp.

Referenced by KI_TEST::SCOPED_TEMP_DIR::SCOPED_TEMP_DIR().

◆ reportTempDir()

static void reportTempDir ( const wxString & aMessage)
static

Report a message about a temporary directory.

This cannot use wx logging as it can be called outside the WX Init/Uninit lifetime, so it goes to stderr.

Definition at line 47 of file file_utils.cpp.

Referenced by KI_TEST::SCOPED_TEMP_DIR::Retain(), shouldKeepTemp(), and KI_TEST::SCOPED_TEMP_DIR::~SCOPED_TEMP_DIR().

◆ shouldKeepTemp()

static bool shouldKeepTemp ( const std::filesystem::path & aPath,
const wxString & aKeepEnvValue )
static

Definition at line 53 of file file_utils.cpp.

References reportTempDir().

Referenced by KI_TEST::SCOPED_TEMP_DIR::SCOPED_TEMP_DIR().