def get_dir(self, path):
        """Get the directory matching the given path from a connected device.
        The path must be a directory.

        This only returns information on the single directory ("ls -ldZ"): to
        get information about all the directory content recursively, use
        get_files(path).

        Returns a dictionary (filename, File)."""
        path = os.path.normpath(path)
        cmd = ["ls", "-ldZ", "'" + path + "'"]
        listing = subprocess.check_output(self.shell + cmd).split('\n')
        line = listing[0].strip("\r")
        # Parse ls -ldZ output for a directory
        try:
            f = File(line, os.path.dirname(path), self.android_version)
        except __HOLE__ as e:
            self.log.error(e)
            return None
        else:
            return {f.absname: f}
dataset/ETHPy150Open seandroid-analytics/seal/sealib/device.py/Device.get_dir