MCPcopy Create free account
hub / github.com/apache/solr / postFiles

Method postFiles

solr/core/src/java/org/apache/solr/cli/PostTool.java:475–483  ·  view source on GitHub ↗

Post all filenames provided in args @param args array of file names @param startIndexInArgs offset to start @param out output stream to post data to @param type default content-type to use when posting (this may be overridden in auto mode) @return number of files posted @throws IOException if an I/

(String[] args, int startIndexInArgs, OutputStream out, String type)

Source from the content-addressed store, hash-verified

473 * @throws IOException if an I/O error occurs
474 */
475 public int postFiles(String[] args, int startIndexInArgs, OutputStream out, String type)
476 throws IOException {
477 reset();
478 int filesPosted = 0;
479 for (int j = startIndexInArgs; j < args.length; j++) {
480 filesPosted = getFilesPosted(out, type, args[j]);
481 }
482 return filesPosted;
483 }
484
485 private int getFilesPosted(final OutputStream out, final String type, final String src)
486 throws IOException {

Callers 6

testDoFilesModeMethod · 0.95
doFilesModeMethod · 0.95
getFilesPostedMethod · 0.95
postDirectoryMethod · 0.95
handleGlobMethod · 0.95

Calls 4

resetMethod · 0.95
getFilesPostedMethod · 0.95
postFileMethod · 0.95
sleepMethod · 0.45

Tested by 2

testDoFilesModeMethod · 0.76