| 207 | } |
| 208 | |
| 209 | void recursiveCopy( const IndexedIO *src, IndexedIO *dst ) |
| 210 | { |
| 211 | IndexedIO::EntryIDList fileNames; |
| 212 | src->entryIds( fileNames, IndexedIO::EntryType::File ); |
| 213 | |
| 214 | for( const auto &fileName : fileNames ) |
| 215 | { |
| 216 | int dummy = 0; |
| 217 | handleFile<Copier, int>( src, dst, fileName, dummy ); |
| 218 | } |
| 219 | |
| 220 | IndexedIO::EntryIDList directoryNames; |
| 221 | src->entryIds( directoryNames, IndexedIO::EntryType::Directory ); |
| 222 | |
| 223 | for( const auto &directoryName : directoryNames ) |
| 224 | { |
| 225 | IndexedIOPtr childDst = dst->subdirectory( directoryName, IndexedIO::CreateIfMissing ); |
| 226 | recursiveCopy( src->subdirectory( directoryName, IndexedIO::ThrowIfMissing ).get(), childDst.get() ); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | //! Task for traversing all files in parallel. New tasks are spawned for each directory |
| 231 | template<template<typename, typename> class FileHandler, typename FileCallback> |
no test coverage detected