/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }
/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }
/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }
/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }
/** * Copies the source file to the target. * @param src item to copy * @param target where to copy the item * @throws IOException if copy fails */ protected void copyFileToTarget(PathData src, PathData target) throws IOException { final boolean preserveRawXattrs = checkPathsForReservedRaw(src.path, target.path); src.fs.setVerifyChecksum(verifyChecksum); InputStream in = null; try { in = src.fs.open(src.path); copyStreamToTarget(in, target); preserveAttributes(src, target, preserveRawXattrs); } finally { IOUtils.closeStream(in); } }