• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/sftp.php
  • Класс: BitrixSaleTradingPlatformSftp
  • Вызов: Sftp::getFilesList
public function getFilesList($remotePath)
{
	$result = array();
	$fullPath = "sftp://".intval($this->sftp).$remotePath;
	$dirHandle = @opendir("ssh2.".$fullPath);

	if($dirHandle === false)
		throw new SystemException(Loc::getMessage("TRADING_PLATFORM_SFTP_ERROR_OPEN_PATH", array("#PATH#" => $fullPath)));

	while (false !== ($file = readdir($dirHandle)))
		if(is_file("ssh2.".$fullPath."/".$file))
			$result[] = $file;

	return $result;
}