(dirPath, arrayOfFiles)
| 130 | }; |
| 131 | |
| 132 | const getAllFiles = (dirPath, arrayOfFiles) => { |
| 133 | const files = fs.readdirSync(dirPath); |
| 134 | |
| 135 | arrayOfFiles = arrayOfFiles || []; |
| 136 | |
| 137 | files.forEach((file) => { |
| 138 | if (fs.statSync(dirPath + "/" + file).isDirectory()) { |
| 139 | arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles); |
| 140 | } else { |
| 141 | arrayOfFiles.push(path.join(dirPath, "/", file)); |
| 142 | } |
| 143 | }); |
| 144 | |
| 145 | return arrayOfFiles; |
| 146 | }; |
| 147 | |
| 148 | export const copyDirectorySync = (srcPath, destPath) => { |
| 149 | const allFiles = getAllFiles(srcPath); |
no outgoing calls
no test coverage detected