private static boolean matches(ByteString a, HashCode b) {
return Arrays.equals(a.toByteArray(), b.asBytes());
}
private RemoteFile buildRemoteFile(Sftp sftp, ByteString key, boolean mkdirs) throws IOException {
RemoteFile file = buildRemoteFile(key);
if (mkdirs) {
// TODO: Cache created / not created state?
sftp.mkdirs(file.getParentFile().getSshPath());
}
return file;
}