original_string: public function channelFileList($cid, $cpw = "", $path = "/", $recursive = FALSE)
    {
      $files = $this->execute("ftgetfilelist", array("cid" => $cid, "cpw" => $cpw, "path" => $path))->toArray();
      $count = count($files);
  
      for($i = 0; $i < $count; $i++)
      {
        $files[$i]["sid"]  = $this->getId();
        $files[$i]["cid"]  = $files[0]["cid"];
        $files[$i]["path"] = $files[0]["path"];
        $files[$i]["src"]  = new Str($cid ? $files[$i]["path"] : "/");
  
        if(!$files[$i]["src"]->endsWith("/"))
        {
          $files[$i]["src"]->append("/");
        }
  
        $files[$i]["src"]->append($files[$i]["name"]);
  
        if($recursive && $files[$i]["type"] == TeamSpeak3::FILE_TYPE_DIRECTORY)
        {
          $files = array_merge($files, $this->channelFileList($cid, $cpw, $path . $files[$i]["name"], $recursive));
        }
      }
  
      uasort($files, array(__CLASS__, "sortFileList"));
  
      return $files;
    }
code: public function channelFileList($cid, $cpw = "", $path = "/", $recursive = FALSE)
    {
      $files = $this->execute("ftgetfilelist", array("cid" => $cid, "cpw" => $cpw, "path" => $path))->toArray();
      $count = count($files);
  
      for($i = 0; $i < $count; $i++)
      {
        $files[$i]["sid"]  = $this->getId();
        $files[$i]["cid"]  = $files[0]["cid"];
        $files[$i]["path"] = $files[0]["path"];
        $files[$i]["src"]  = new Str($cid ? $files[$i]["path"] : "/");
  
        if(!$files[$i]["src"]->endsWith("/"))
        {
          $files[$i]["src"]->append("/");
        }
  
        $files[$i]["src"]->append($files[$i]["name"]);
  
        if($recursive && $files[$i]["type"] == TeamSpeak3::FILE_TYPE_DIRECTORY)
        {
          $files = array_merge($files, $this->channelFileList($cid, $cpw, $path . $files[$i]["name"], $recursive));
        }
      }
  
      uasort($files, array(__CLASS__, "sortFileList"));
  
      return $files;
    }
code_tokens: public function channelFileList ( $ cid , $ cpw = "" , $ path = "/" , $ recursive = FALSE ) { $ files = $ this -> execute ( "ftgetfilelist" , array ( "cid" => $ cid , "cpw" => $ cpw , "path" => $ path ) ) -> toArray ( ) ; $ count = count ( $ files ) ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ files [ $ i ] [ "sid" ] = $ this -> getId ( ) ; $ files [ $ i ] [ "cid" ] = $ files [ 0 ] [ "cid" ] ; $ files [ $ i ] [ "path" ] = $ files [ 0 ] [ "path" ] ; $ files [ $ i ] [ "src" ] = new Str ( $ cid ? $ files [ $ i ] [ "path" ] : "/" ) ; if ( ! $ files [ $ i ] [ "src" ] -> endsWith ( "/" ) ) { $ files [ $ i ] [ "src" ] -> append ( "/" ) ; } $ files [ $ i ] [ "src" ] -> append ( $ files [ $ i ] [ "name" ] ) ; if ( $ recursive && $ files [ $ i ] [ "type" ] == TeamSpeak3 :: FILE_TYPE_DIRECTORY ) { $ files = array_merge ( $ files , $ this -> channelFileList ( $ cid , $ cpw , $ path . $ files [ $ i ] [ "name" ] , $ recursive ) ) ; } } uasort ( $ files , array ( __CLASS__ , "sortFileList" ) ) ; return $ files ; }
docstring: Returns a list of files and directories stored in the specified channels file repository.
  
  @param  integer $cid
  @param  string  $cpw
  @param  string  $path
  @param  boolean $recursive
  @return array
docstring_tokens: Returns a list of files and directories stored in the specified channels file repository .