Searched refs:old_file (Results 1 – 2 of 2) sorted by relevance
72 bool SafeReplaceFile(std::string_view old_file, std::string_view new_file) { in SafeReplaceFile() argument73 std::string to_be_deleted(old_file); in SafeReplaceFile()77 if (adb_rename(old_file.data(), to_be_deleted.c_str()) != 0) { in SafeReplaceFile()80 PLOG(INFO) << "Failed to rename " << old_file; in SafeReplaceFile()84 if (adb_rename(new_file.data(), old_file.data()) != 0) { in SafeReplaceFile()85 PLOG(ERROR) << "Unable to rename file (" << new_file << " => " << old_file << ")"; in SafeReplaceFile()88 adb_rename(to_be_deleted.c_str(), old_file.data()); in SafeReplaceFile()
42 def ReplaceBytes(target_file, old_file, new_file): argument44 with open(old_file, 'rb') as f:65 ReplaceBytes(args.target_file, args.old_file, args.new_file)