MCPcopy
hub / github.com/alibaba/freeline / execute

Method execute

freeline_core/android_tools.py:169–186  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

167 self._changed_files = changed_files
168
169 def execute(self):
170 cache_path = os.path.join(self._config['build_cache_dir'], 'stat_cache.json')
171 stat_cache = load_json_cache(cache_path)
172
173 for module, file_dict in self._changed_files.iteritems():
174 for key, files in file_dict.iteritems():
175 if key != 'apt':
176 for fpath in files:
177 if not fpath.startswith(self._config['build_cache_dir']) and os.path.exists(fpath):
178 self.debug('refresh {} stat'.format(fpath))
179 os.utime(fpath, None)
180 if fpath not in stat_cache[module]:
181 stat_cache[module][fpath] = {}
182
183 stat_cache[module][fpath]['mtime'] = os.path.getmtime(fpath)
184 stat_cache[module][fpath]['md5'] = get_md5(fpath)
185
186 write_json_cache(cache_path, stat_cache)
187
188
189class DirectoryFinder(object):

Callers

nothing calls this directly

Calls 4

load_json_cacheFunction · 0.90
get_md5Function · 0.90
write_json_cacheFunction · 0.90
debugMethod · 0.45

Tested by

no test coverage detected