mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 10:15:14 +00:00
Merge remote-tracking branch 'DavidAnderson84/patch-4' into 1.0
This commit is contained in:
commit
b47813cf47
@ -1784,11 +1784,12 @@ class Net_SFTP extends Net_SSH2
|
||||
* @param optional Integer $mode
|
||||
* @param optional Integer $start
|
||||
* @param optional Integer $local_start
|
||||
* @param optional callable|null $callback
|
||||
* @return Boolean
|
||||
* @access public
|
||||
* @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - Net_SFTP::setMode().
|
||||
*/
|
||||
function put($remote_file, $data, $mode = NET_SFTP_STRING, $start = -1, $local_start = -1)
|
||||
function put($remote_file, $data, $mode = NET_SFTP_STRING, $start = -1, $local_start = -1, $callback = null)
|
||||
{
|
||||
if (!($this->bitmap & NET_SSH2_MASK_LOGIN)) {
|
||||
return false;
|
||||
@ -1885,6 +1886,9 @@ class Net_SFTP extends Net_SSH2
|
||||
return false;
|
||||
}
|
||||
$sent+= strlen($temp);
|
||||
if (is_callable($callback)) {
|
||||
call_user_func($callback, $sent);
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user