question: private void syncImages ( CachedFile targetFolder ) { Map < String , CachedFile > mapOfImagesToCopy = CatalogManager . getMapOfCatalogImages ( ) ; for ( Map . Entry < String , CachedFile > entry : mapOfImagesToCopy . entrySet ( ) ) { CachedFile targetFile = CachedFileManager . addCachedFile ( targetFolder , entry . getKey ( ) ) ; try { syncFiles ( entry . getValue ( ) , targetFile ) ; } catch ( IOException e ) { logger . warn ( "syncImages: Failure copy file '" + entry . getKey ( ) + "' to catalog" ) ; } if ( currentProfile . getZipCatalog ( ) ) { targetFile = CachedFileManager . addCachedFile ( CatalogManager . getGenerateFolder ( ) , entry . getKey ( ) ) ; try { syncFiles ( entry . getValue ( ) , targetFile ) ; } catch ( IOException e ) { logger . warn ( "syncImages: Failure copy file '" + entry . getKey ( ) + "' to temporary area for ZIP" ) ; } } } }
target:  Sync a set of image files across to the specified target folder The images are segregated into folders according to the bookid Used when images are stored within catalog. If we are going to ZIP the files then we also need to put the images into the temprorary folder area so that they get picked up by the ZIP catalog procedure.