KiCad PCB EDA Suite
|
#include <project_archiver.h>
Public Member Functions | |
PROJECT_ARCHIVER () | |
~PROJECT_ARCHIVER ()=default | |
bool | Archive (const wxString &aSrcDir, const wxString &aDestFile, REPORTER &aReporter, bool aVerbose=true, bool aIncludeExtraFiles=false) |
Creates an archive of the project. More... | |
bool | Unarchive (const wxString &aSrcFile, const wxString &aDestDir, REPORTER &aReporter) |
Extracts an archive of the current project over existing files Warning: this will overwrite files in the project directory. More... | |
Definition at line 31 of file project_archiver.h.
PROJECT_ARCHIVER::PROJECT_ARCHIVER | ( | ) |
Definition at line 40 of file project_archiver.cpp.
|
default |
bool PROJECT_ARCHIVER::Archive | ( | const wxString & | aSrcDir, |
const wxString & | aDestFile, | ||
REPORTER & | aReporter, | ||
bool | aVerbose = true , |
||
bool | aIncludeExtraFiles = false |
||
) |
Creates an archive of the project.
aSrcFile | is the full path to the project to be archived |
aDestFile | is the full path to the zip file to be created |
aReporter | is used to report status |
aVerbose | controls the verbosity of reported status messages |
aIncludeExtraFiles | if true will archive legacy and output files |
Definition at line 111 of file project_archiver.cpp.
References _, arrayDim(), extensionList, REPORTER::Report(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_INFO.
Referenced by SETTINGS_MANAGER::BackupProject(), and KICAD_MANAGER_FRAME::OnArchiveFiles().
bool PROJECT_ARCHIVER::Unarchive | ( | const wxString & | aSrcFile, |
const wxString & | aDestDir, | ||
REPORTER & | aReporter | ||
) |
Extracts an archive of the current project over existing files Warning: this will overwrite files in the project directory.
Use with care. The caller is responsible for doing any reloading of state after taking this action.
aSrcFile | is the full path to the archive to extract |
aDestDir | is the target directory to unarchive to |
aReporter | is used to report status |
Definition at line 46 of file project_archiver.cpp.
References _, CopyStreamData(), REPORTER::Report(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_INFO.
Referenced by KICAD_MANAGER_FRAME::OnUnarchiveFiles().