Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+9 -1
View File
@@ -164,10 +164,11 @@ class _Ftp
*
* @param string $filename The file to download
* @param string|null $target Location to save downloaded file or NULL to return contents
* @param bool $returnPath Return the path to the downloaded file instead of the contents
* @return string File contents
* @throws \IPS\Ftp\Exception
*/
public function download( $filename, $target=NULL )
public function download( $filename, $target=NULL, $returnPath=FALSE )
{
$temp = FALSE;
if ( $target === NULL )
@@ -180,6 +181,13 @@ class _Ftp
{
throw new \IPS\Ftp\Exception( 'COULD_NOT_DOWNLOAD' );
}
/* We use this to avoid out of memory errors - just return path */
if( $returnPath === TRUE )
{
return $target;
}
$result = file_get_contents( $target );
if ( $temp )