private static void addContentsToQueue ( Queue < File > fileQueue , File sourceDir ) throws MojoExecutionException { File [ ] files = sourceDir . listFiles ( ) ; if ( files != null ) { for ( File currentFile : files ) { fileQueue . add ( currentFile ) ; } } else { throw new MojoExecutionException ( String . format ( "Couldn't get list of files in source dir [%s]" , sourceDir ) ) ; } }
Adds the contents of a specific directory to a queue of files .