MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / copyFile

Method copyFile

java/src/org/openqa/selenium/io/FileHandler.java:133–141  ·  view source on GitHub ↗
(File from, File to)

Source from the content-addressed store, hash-verified

131 }
132
133 private static void copyFile(File from, File to) throws IOException {
134 try (OutputStream out = new FileOutputStream(to)) {
135 final long copied = Files.copy(from.toPath(), out);
136 final long length = from.length();
137 if (copied != length) {
138 throw new IOException("Could not transfer all bytes from " + from + " to " + to);
139 }
140 }
141 }
142}

Callers 1

copyMethod · 0.95

Calls 2

lengthMethod · 0.65
copyMethod · 0.45

Tested by

no test coverage detected