private static List < CopyPath > expandSrcs ( List < Path > srcs , Path dstPath ) throws IOException { List < CopyPath > expandedSrcs = new ArrayList < CopyPath > ( ) ; for ( Path src : srcs ) { expandedSrcs . addAll ( expandSingle ( src , dstPath ) ) ; } return expandedSrcs ; }
Expands all sources if they are file pattern expand to list out all files matching the pattern if they are a directory expand to list out all files under the directory .