public void copyDirectory ( Location locn , DocPath dir ) throws DocFileIOException { boolean first = true ; for ( DocFile f : DocFile . list ( configuration , locn , dir ) ) { if ( ! f . isDirectory ( ) ) { continue ; } DocFile srcdir = f ; DocFile destdir = DocFile . createFileForOutput ( configuration , dir ) ; if ( srcdir . isSameFile ( destdir ) ) { continue ; } for ( DocFile srcfile : srcdir . list ( ) ) { DocFile destfile = destdir . resolve ( srcfile . getName ( ) ) ; if ( srcfile . isFile ( ) ) { if ( destfile . exists ( ) && ! first ) { messages . warning ( "doclet.Copy_Overwrite_warning" , srcfile . getPath ( ) , destdir . getPath ( ) ) ; } else { messages . notice ( "doclet.Copying_File_0_To_Dir_1" , srcfile . getPath ( ) , destdir . getPath ( ) ) ; destfile . copyFile ( srcfile ) ; } } else if ( srcfile . isDirectory ( ) ) { if ( configuration . copydocfilesubdirs && ! configuration . shouldExcludeDocFileDir ( srcfile . getName ( ) ) ) { copyDirectory ( locn , dir . resolve ( srcfile . getName ( ) ) ) ; } } } first = false ; } }
Copy files from a doc path location to the output .