Lines Matching refs:target_file
122 def _copy_to_binary_cache(self, from_path, expected_build_id, target_file): argument
123 if target_file[0] == '/':
124 target_file = target_file[1:]
125 target_file = target_file.replace('/', os.sep)
126 target_file = os.path.join(self.binary_cache_dir, target_file)
127 if not self._need_to_copy(from_path, target_file, expected_build_id):
130 target_dir = os.path.dirname(target_file)
133 log_info('copy to binary_cache: %s to %s' % (from_path, target_file))
134 shutil.copy(from_path, target_file)
136 def _need_to_copy(self, source_file, target_file, expected_build_id): argument
137 if not os.path.isfile(target_file):
139 if self._read_build_id(target_file) != expected_build_id:
142 target_file)