original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Converts a line of returned output into a \sb\Samba_Listing object
  @param $listing
  @param $subdir
  @return \sb\Samba\Listing
docstring_tokens: Converts a line of returned output into a \ sb \ Samba_Listing object