'poke for a non empty directory
:return: Bool depending on the search criteria'

def poke(self, context):

    sb = self.hook(self.hdfs_conn_id).get_conn()
    logging.getLogger('snakebite').setLevel(logging.WARNING)
    result = [f for f in sb.ls([self.filepath], include_toplevel=True)]
    result = self.filter_for_ignored_ext(result, self.ignored_ext, self.ignore_copying)
    result = self.filter_for_filesize(result, self.file_size)
    if self.be_empty:
        logging.info('Poking    for    filepath    {self.filepath}    to    a    empty    directory'.format(**locals()))
        return ((len(result) == 1) and (result[0]['path'] == self.filepath))
    else:
        logging.info('Poking    for    filepath    {self.filepath}    to    a    non    empty    directory'.format(**locals()))
        result.pop(0)
        return (bool(result) and (result[0]['file_type'] == 'f'))
