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]["cid"]  = $files[0]["cid"];
      $files[$i]["path"] = $files[0]["path"];
      $files[$i]["src"]  = new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String($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"] == \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::FILE_TYPE_DIRECTORY)
      {
        $files = array_merge($files, $this->channelFileList($cid, $cpw, $path . $files[$i]["name"], $recursive));
      }
    }

    uasort($files, array(__CLASS__, "sortFileList"));

    return $files;
  }
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]["cid"]  = $files[0]["cid"];
      $files[$i]["path"] = $files[0]["path"];
      $files[$i]["src"]  = new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String($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"] == \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::FILE_TYPE_DIRECTORY)
      {
        $files = array_merge($files, $this->channelFileList($cid, $cpw, $path . $files[$i]["name"], $recursive));
      }
    }

    uasort($files, array(__CLASS__, "sortFileList"));

    return $files;
  }
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 ] [ "cid" ] = $ files [ 0 ] [ "cid" ] ; $ files [ $ i ] [ "path" ] = $ files [ 0 ] [ "path" ] ; $ files [ $ i ] [ "src" ] = new \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ Helper \ String ( $ 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" ] == \ ManiaLivePlugins \ Standard \ TeamSpeak \ TeamSpeak3 \ TeamSpeak3 :: FILE_TYPE_DIRECTORY ) { $ files = array_merge ( $ files , $ this -> channelFileList ( $ cid , $ cpw , $ path . $ files [ $ i ] [ "name" ] , $ recursive ) ) ; } } uasort ( $ files , array ( __CLASS__ , "sortFileList" ) ) ; return $ files ; }
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
Returns a list of files and directories stored in the specified channels file repository .