MCPcopy Create free account
hub / github.com/Neo-Maoku/SearchAvailableExe / CopyFileToFolder

Function CopyFileToFolder

SearchAvailableExe/Tools.cpp:872–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872string CopyFileToFolder(const std::string& sourceFilePath, const std::string& targetFolderPath, bool isNeedHook, DWORD exitCode) {
873 std::string targetFilePath = targetFolderPath + "\\" + sourceFilePath.substr(sourceFilePath.find_last_of("\\/") + 1);
874
875 CopyFileA(sourceFilePath.c_str(), targetFilePath.c_str(), FALSE);
876
877 if (isNeedHook) {
878 std::lock_guard<std::mutex> lock(mtx);
879 bool isSucc = fixFile(targetFilePath, exitCode);
880 if (!isSucc)
881 return "";
882 }
883
884 return targetFilePath;
885}
886
887bool DeleteDirectory(const string& path) {
888 WIN32_FIND_DATAA findData;

Callers 1

RunPEFunction · 0.85

Calls 1

fixFileFunction · 0.85

Tested by

no test coverage detected