From e2488749ae40657b51800a5a7eebf2f74d82045d Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 15 Aug 2024 23:32:10 -0500 Subject: [PATCH] SFTP: add getSupportedExtensions() method --- phpseclib/Net/SFTP.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index caf2a0a3..0adc3e64 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -3496,6 +3496,24 @@ class SFTP extends SSH2 return $temp; } + /** + * Get supported SFTP extensions + * + * @return array + */ + public function getSupportedExtensions() + { + if (!($this->bitmap & SSH2::MASK_LOGIN)) { + return false; + } + + if (!$this->partial_init) { + $this->partial_init_sftp_connection(); + } + + return $this->extensions; + } + /** * Get supported SFTP versions *