'Execute the ``LIST`` command of the ``SYNC`` API.
Arguments:
path(str): Path of the directory to list.
Return:
A dictionary, where the keys are relative filenames,
and the values are a dictionary containing the same
values as ``stat()`` supplies.
Note:
In recent releases of Android (e.g. 7.0), the domain that
adbd executes from does not have access to everything that
the shell user does.
Because of this, while the shell user can get listings of
e.g. the root directory (\'/\'), adbd cannot.
The SYNC APIs are executed within the adbd context, not the
shell user context.
This issue is not a problem if the phone is rooted via
\'adb root\', since adbd then runs in the ``su`` domain.
Examples:
>>> pprint(AdbClient().list(\'/data/user\'))
{\'0\': {\'mode\': 41471, \'size\': 11, \'time\': ...}}
>>> AdbClient().list(\'/does/not/exist\')
Traceback (most recent call last):
PwnlibException: Cannot list directory \'/does/not/exist\': Does not exist'

def list(self, path):

    st = self.stat(path)
    if (not st):
        log.error(('Cannot    list    directory    %r:    Does    not    exist' % path))
    if (not stat.S_ISDIR(st['mode'])):
        log.error(('Cannot    list    directory    %r:    Path    is    not    a    directory' % path))
    return self._list(path)
