Subject: | do_read does not read to end of file by default |
Hi,
I'm not sure how critical this is but if I do not specify the last two
parameters to the do_read method I don't get a whole file read back to
me. Are the last two parameters (offset and copy size) required or
optional?
For example:
my $handle = $sftp->do_open('/tmp/bla');
my ($msg, $rc) = $sftp->do_read($handle);
Only returns half a file for some reason. In order to get it to return
the whole file I have to do the following to force it to read the whole
file.
my $handle = $sftp->do_open('/tmp/bla');
my $stat = $sftp->do_fstat($handle);
my ($msg, $rc) = $sftp->do_read($handle,0,$stat->size);