29#include <wx/filename.h>
30#include <wx/process.h>
31#include <wx/zipstrm.h>
37#define UNIX_STRING_DIR_SEP wxT( "/" )
38#define WIN_STRING_DIR_SEP wxT( "\\" )
69 std::function<
bool(
const std::string& token, wxString& value )> aCallback,
83 const wxString& aFileName = wxEmptyString,
84 wxProcess* aCallback =
nullptr,
bool aFileForKicad =
true );
134 int& fileCopiedCount,
const std::vector<wxString>& aExclusions );
145 const wxString& aParentDir =
"" );
KICOMMON_API bool CopyFilesOrDirectory(const wxString &aSourceDir, const wxString &aDestDir, wxString &aErrors, int &fileCopiedCount, const std::vector< wxString > &aExclusions)
KICOMMON_API wxString QuoteFullPath(wxFileName &fn, wxPathFormat format=wxPATH_NATIVE)
Quote return value of wxFileName::GetFullPath().
KICOMMON_API void KiCopyFile(const wxString &aSrcPath, const wxString &aDestPath, wxString &aErrors)
KICOMMON_API bool OpenPDF(const wxString &file)
Run the PDF viewer and display a PDF file.
KICOMMON_API void QuoteString(wxString &string)
Add un " to the start and the end of string (if not already done).
KICOMMON_API wxString FindKicadFile(const wxString &shortname)
Search the executable file shortname in KiCad binary path and return full file name if found or short...
KICOMMON_API bool RmDirRecursive(const wxString &aDirName, wxString *aErrors=nullptr)
Remove the directory aDirName and all its contents including subdirectories and their files.
KICOMMON_API void CopySexprFile(const wxString &aSrcPath, const wxString &aDestPath, std::function< bool(const std::string &token, wxString &value)> aCallback, wxString &aErrors)
KICOMMON_API int ExecuteFile(const wxString &aEditorName, const wxString &aFileName=wxEmptyString, wxProcess *aCallback=nullptr, bool aFileForKicad=true)
Call the executable file aEditorName with the parameter aFileName.
KICOMMON_API bool CopyDirectory(const wxString &aSourceDir, const wxString &aDestDir, wxString &aErrors)
Copy a directory and its contents to another directory.
KICOMMON_API bool AddDirectoryToZip(wxZipOutputStream &aZip, const wxString &aSourceDir, wxString &aErrors, const wxString &aParentDir="")
Add a directory and its contents to a zip file.