

def GetFileObject(self, data_stream_name=''):
    'Retrieves the file-like object.\n\n    Args:\n      data_stream_name: optional data stream name. The default is\n                        an empty string which represents the default\n                        data stream.\n\n    Returns:\n      A file-like object (instance of file_io.FileIO) or None.\n\n    Raises:\n      IOError: if the file entry is not a file.\n    '
    if (not self.IsFile()):
        raise IOError('Cannot open non-file.')
    if data_stream_name:
        return
    location = getattr(self.path_spec, 'location', None)
    if (location is None):
        return
    file_data = location._file_system.GetDataByPath(location)
    file_object = fake_file_io.FakeFile(self._resolver_context, file_data)
    file_object.open(path_spec=self.path_spec)
    return file_object

dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/vfs/fake_file_entry.py FakeFileEntry.GetFileObject/VarMisuse@70/229 `self`->`location`