Lines Matching refs:rpath
87 std::string rpath; member
97 : lpath(local_path), rpath(remote_path), mode(mode) { in copyinfo()
98 ensure_trailing_separators(lpath, rpath); in copyinfo()
100 rpath.append(name); in copyinfo()
102 ensure_trailing_separators(lpath, rpath); in copyinfo()
578 const std::string& rpath, unsigned mtime, const char* data, in SendSmallFile() argument
582 return SendLargeFile(path, mode, lpath, rpath, mtime, CompressionType::None, dry_run); in SendSmallFile()
615 WriteOrDie(lpath, rpath, &buf[0], (p - &buf[0])); in SendSmallFile()
617 RecordFileSent(lpath, rpath); in SendSmallFile()
619 ReportProgress(rpath, data_length, data_length); in SendSmallFile()
624 const std::string& rpath, unsigned mtime, CompressionType compression, in SendLargeFile() argument
632 return SendLargeFileLegacy(path, mode, lpath, rpath, mtime); in SendLargeFile()
700 ReportProgress(rpath, bytes_copied, total_size); in SendLargeFile()
714 WriteOrDie(lpath, rpath, &sbuf, sizeof(SyncRequest) + output.size()); in SendLargeFile()
731 RecordFileSent(lpath, rpath); in SendLargeFile()
732 return WriteOrDie(lpath, rpath, &msg.data, sizeof(msg.data)); in SendLargeFile()
736 const std::string& rpath, unsigned mtime) { in SendLargeFileLegacy() argument
772 WriteOrDie(lpath, rpath, &sbuf, sizeof(SyncRequest) + bytes_read); in SendLargeFileLegacy()
776 ReportProgress(rpath, bytes_copied, total_size); in SendLargeFileLegacy()
782 RecordFileSent(lpath, rpath); in SendLargeFileLegacy()
783 return WriteOrDie(lpath, rpath, &msg.data, sizeof(msg.data)); in SendLargeFileLegacy()
1049 static bool sync_send(SyncConnection& sc, const std::string& lpath, const std::string& rpath, in sync_send() argument
1054 if (sync_lstat(sc, rpath, &st)) { in sync_send()
1072 if (!sc.SendSmallFile(rpath, mode, lpath, rpath, mtime, buf, data_length, dry_run)) { in sync_send()
1090 if (!sc.SendSmallFile(rpath, mode, lpath, rpath, mtime, data.data(), data.size(), in sync_send()
1095 if (!sc.SendLargeFile(rpath, mode, lpath, rpath, mtime, compression, dry_run)) { in sync_send()
1102 static bool sync_recv_v1(SyncConnection& sc, const char* rpath, const char* lpath, const char* name, in sync_recv_v1() argument
1104 if (!sc.SendRequest(ID_RECV_V1, rpath)) return false; in sync_recv_v1()
1125 sc.ReportCopyFailure(rpath, lpath, msg); in sync_recv_v1()
1150 sc.ReportProgress(name != nullptr ? name : rpath, bytes_copied, expected_size); in sync_recv_v1()
1157 static bool sync_recv_v2(SyncConnection& sc, const char* rpath, const char* lpath, const char* name, in sync_recv_v2() argument
1161 if (!sc.SendRecv2(rpath, compression)) return false; in sync_recv_v2()
1213 sc.ReportCopyFailure(rpath, lpath, msg); in sync_recv_v2()
1250 sc.ReportProgress(name != nullptr ? name : rpath, bytes_copied, expected_size); in sync_recv_v2()
1266 static bool sync_recv(SyncConnection& sc, const char* rpath, const char* lpath, const char* name, in sync_recv() argument
1269 return sync_recv_v2(sc, rpath, lpath, name, expected_size, compression); in sync_recv()
1271 return sync_recv_v1(sc, rpath, lpath, name, expected_size); in sync_recv()
1290 const std::string& rpath) { in local_build_list() argument
1313 copyinfo ci(lpath, rpath, de->d_name, st.st_mode); in local_build_list()
1331 directory_list->push_back(ci.rpath); in local_build_list()
1332 local_build_list(sc, file_list, directory_list, ci.lpath, ci.rpath); in local_build_list()
1348 static bool copy_local_dir_remote(SyncConnection& sc, std::string lpath, std::string rpath, in copy_local_dir_remote() argument
1355 ensure_trailing_separators(lpath, rpath); in copy_local_dir_remote()
1361 for (std::string path = rpath; !is_root_dir(path); path = android::base::Dirname(path)) { in copy_local_dir_remote()
1367 if (!local_build_list(sc, &file_list, &directory_list, lpath, rpath)) { in copy_local_dir_remote()
1410 if (!sc.SendLstat(ci.rpath)) { in copy_local_dir_remote()
1430 sc.Println("would push: %s -> %s", ci.lpath.c_str(), ci.rpath.c_str()); in copy_local_dir_remote()
1432 if (!sync_send(sc, ci.lpath, ci.rpath, ci.time, ci.mode, false, compression, in copy_local_dir_remote()
1548 const std::string& rpath, const std::string& lpath) { in remote_build_list() argument
1553 copyinfo ci(android::base::Dirname(lpath), android::base::Dirname(rpath), in remote_build_list()
1563 copyinfo ci(lpath, rpath, name, mode); in remote_build_list()
1570 sc.Warning("skipping special file '%s' (mode = 0o%o)", ci.rpath.c_str(), ci.mode); in remote_build_list()
1579 if (!sync_ls(sc, rpath, callback)) { in remote_build_list()
1586 if (!sync_stat_fallback(sc, link_ci.rpath, &st)) { in remote_build_list()
1587 sc.Warning("stat failed for path %s: %s", link_ci.rpath.c_str(), strerror(errno)); in remote_build_list()
1602 if (!remote_build_list(sc, file_list, current.rpath, current.lpath)) { in remote_build_list()
1623 static bool copy_remote_dir_local(SyncConnection& sc, std::string rpath, std::string lpath, in copy_remote_dir_local() argument
1629 ensure_trailing_separators(lpath, rpath); in copy_remote_dir_local()
1634 if (!remote_build_list(sc, &file_list, rpath, lpath)) { in copy_remote_dir_local()
1654 if (!sync_recv(sc, ci.rpath.c_str(), ci.lpath.c_str(), nullptr, ci.size, compression)) { in copy_remote_dir_local()
1667 sc.ReportTransferRate(rpath, TransferDirection::pull); in copy_remote_dir_local()
1782 bool do_sync_sync(const std::string& lpath, const std::string& rpath, bool list_only, in do_sync_sync() argument
1788 bool success = copy_local_dir_remote(sc, lpath, rpath, true, list_only, compression, dry_run); in do_sync_sync()