'Retrieve a directory listing of files/folders at *path*
:param string/unicode service_name: the name of the shared folder for the *path*
:param string/unicode path: path relative to the *service_name* where we are interested to learn about its files/sub-folders.
:param integer search: integer value made up from a bitwise-OR of *SMB_FILE_ATTRIBUTE_xxx* bits (see smb_constants.py).
The default *search* value will query for all read-only, hidden, system, archive files and directories.
:param string/unicode pattern: the filter to apply to the results before returning to the client.
:return: A list of :doc:`smb.base.SharedFile<smb_SharedFile>` instances.'

def listPath(self, service_name, path, search=((((SMB_FILE_ATTRIBUTE_READONLY | SMB_FILE_ATTRIBUTE_HIDDEN) | SMB_FILE_ATTRIBUTE_SYSTEM) | SMB_FILE_ATTRIBUTE_DIRECTORY) | SMB_FILE_ATTRIBUTE_ARCHIVE), pattern='*', timeout=30):

    if (not self.sock):
        raise NotConnectedError('Not    connected    to    server')
    results = []
    def cb(entries):
        self.is_busy = False
        results.extend(entries)
    def eb(failure):
        self.is_busy = False
        raise failure
    self.is_busy = True
    try:
        self._listPath(service_name, path, cb, eb, search=search, pattern=pattern, timeout=timeout)
        while self.is_busy:
            self._pollForNetBIOSPacket(timeout)
    finally:
        self.is_busy = False
    return results
