private function parseListing($listing, $subdir = '')
    {
        $ret = new \sb\Samba\Listing();
        $exp = '/^\s{2}([\w \-]+\.?\w{3,4})\s+([A-Z]?)\s+(\d+)\s+(\w{3}.+)$/';

        preg_match_all($exp, $listing, $matches);

        if($matches[0]) {
            $ret->name = $matches[1][0];
            $ret->type = $matches[2][0];
            $ret->size = $matches[3][0];
            $ret->path = $subdir;
            $ret->datemodified =  $matches[4][0];

            return $ret;
        }

        return 0;
    }