public boolean copyToFile(final String source, final String destPath, final CopyOptions opts) throws IOException,
                                                                                                 InterruptedException {
        final Session session = startCopyToFile(source, destPath, opts);
        if (session == null) {
            return false;
        }
        try {
            session.join();
            return session.status().isOk();
        } finally {
            Utils.closeQuietly(session);
        }
    }
Copy `source` from remote to local dest.

@param source   source from remote
@param destPath local path
@param opts     options of copy
@return true if copy success
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/snapshot/remote/RemoteFileCopier.java