question: public int postFiles ( String [ ] args , int startIndexInArgs , OutputStream out , String type ) { reset ( ) ; int filesPosted = 0 ; for ( int j = startIndexInArgs ; j < args . length ; j ++ ) { File srcFile = new File ( args [ j ] ) ; if ( srcFile . isDirectory ( ) && srcFile . canRead ( ) ) { filesPosted += postDirectory ( srcFile , out , type ) ; } else if ( srcFile . isFile ( ) && srcFile . canRead ( ) ) { filesPosted += postFiles ( new File [ ] { srcFile } , out , type ) ; } else { File parent = srcFile . getParentFile ( ) ; if ( parent == null ) parent = new File ( "." ) ; String fileGlob = srcFile . getName ( ) ; GlobFileFilter ff = new GlobFileFilter ( fileGlob , false ) ; File [ ] files = parent . listFiles ( ff ) ; if ( files == null || files . length == 0 ) { warn ( "No files or directories matching " + srcFile ) ; continue ; } filesPosted += postFiles ( parent . listFiles ( ff ) , out , type ) ; } } return filesPosted ; }
target:  Post all filenames provided in args