MCPcopy Index your code
hub / github.com/epcdiy/timemachineplus / copyFileUsingFileChannels

Method copyFileUsingFileChannels

src/main/java/serviceRun.java:134–145  ·  view source on GitHub ↗
(File source, File dest)

Source from the content-addressed store, hash-verified

132 return null;
133 }
134 private static void copyFileUsingFileChannels(File source, File dest) throws IOException {
135 FileChannel inputChannel = null;
136 FileChannel outputChannel = null;
137 try {
138 inputChannel = new FileInputStream(source).getChannel();
139 outputChannel = new FileOutputStream(dest).getChannel();
140 outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
141 } finally {
142 inputChannel.close();
143 outputChannel.close();
144 }
145 }
146 boolean exeCopy(File fileHandle,String file,long backupfileid) throws IOException {
147 Backuptargetroot backuptargetroot=getAvalidTarget(fileHandle.length());
148 if(backuptargetroot==null)

Callers 1

exeCopyMethod · 0.95

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected