in reply to Re^2: Net::SFTP and reget ?
in thread Net::SFTP and reget ?

All you need to do is copy the get function and edit the line my $offset = 0;

Update: How about:

sub get_from { my $sftp = shift; my($remote, $local, $cb, $from) = @_; ... my $offset = $from || 0; ... }

The last argument is optional. If not supplied, get_from is the same as get. If supplied, the transfer will start at that offset. You can find out at which byte to start using stat on the local file. You'll need to make no other changes are needed.

Replies are listed 'Best First'.
Re^4: Net::SFTP and reget ?
by Anonymous Monk on Nov 15, 2005 at 19:31 UTC
    Yeah, I guess I can derive from Net::SFTP and implement a reget along these lines. Thanks.

    Steve.