def handle_file(self, path): self.node_stack[-1]['children'].append({ 'name': path.split('/')[-1], 'size': FileAnalyzer.estimate_file_size(self.project.get_file(path))[0], })
def handle_file(self, path): name = path.split('/')[-1] file_obj = self.project.get_file(path) sz, loc = FileAnalyzer.estimate_file_size(file_obj) self.node_stack[-1][-1][name.replace('.', '-')] = [name, sz, loc, {}]