

def _CalculateHashesFileEntry(self, file_system, file_entry, parent_full_path, output_writer):
    'Recursive calculates hashes starting with the file entry.\n\n    Args:\n      file_system: the file system (instance of dfvfs.FileSystem).\n      file_entry: the file entry (instance of dfvfs.FileEntry).\n      parent_full_path: the full path of the parent file entry.\n      output_writer: the output writer (instance of StdoutWriter).\n    '
    full_path = file_system.JoinPath([parent_full_path, file_entry.name])
    for data_stream in file_entry.data_streams:
        hash_value = self._CalculateHashFileEntry(file_entry, data_stream.name)
        if (not hash_value):
            hash_value = 'N/A'
        if data_stream.name:
            display_path = '{0:s}:{1:s}'.format(full_path, data_stream.name)
        else:
            display_path = full_path
        output_writer.WriteFileHash(display_path, hash_value)
    for sub_file_entry in file_entry.sub_file_entries:
        self._CalculateHashesFileEntry(file_system, sub_file_entry, full_path, output_writer)

dataset/ETHPy150Open log2timeline/dfvfs/examples/recursive_hasher.py RecursiveHasher._CalculateHashesFileEntry/original