MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / copyFiles

Function copyFiles

main.js:1239–1255  ·  view source on GitHub ↗
(dirPath, relativeDirPath)

Source from the content-addressed store, hash-verified

1237 if (allowExtraDebugSymbols) {
1238 // Copy *.so.dbg related to TDLib to extracted directory
1239 const copyFiles = (dirPath, relativeDirPath) => {
1240 const files = fs.readdirSync(dirPath);
1241 files.forEach((fileName) => {
1242 const childFilePath = path.join(dirPath, fileName);
1243 if (fs.statSync(childFilePath).isDirectory()) {
1244 copyFiles(childFilePath, relativeDirPath ? path.join(relativeDirPath, fileName) : fileName);
1245 } else if (fileName.match(/^.+\.so\.dbg$/g)) {
1246 const toFilePath = relativeDirPath ?
1247 path.join(temporaryExtractedDirPath, relativeDirPath, fileName) :
1248 path.join(temporaryExtractedDirPath, fileName);
1249 if (!fs.existsSync(toFilePath)) {
1250 fs.copyFileSync(childFilePath, toFilePath);
1251 addedCount++;
1252 }
1253 }
1254 });
1255 };
1256 copyFiles(extraNativeDebugSymbolsPath);
1257 }
1258

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected