Branch Coverage

blib/lib/Net/SFTP/Foreign.pm
Criterion Covered Total %
branch 13 1354 0.9


line true false branch
19 3 0 if ($] >= 5.008) { }
57 0 3 if ($^O =~ /solaris/i)
58 0 0 unless defined $dirty_cleanup
66 0 0 if (warnings::enabled('deprecated') and warnings::enabled('Net::SFTP::Foreign'))
91 0 0 if ($debug and $debug & 1)
96 0 0 if $debug & 16
109 0 0 if $debug and $debug & 32
112 0 0 defined $status ? :
0 0 unless $sftp->{'_status'}
115 0 0 defined $err ? :
0 0 @str ? :
0 0 unless $sftp->{'_error'}
126 0 0 unless $sftp->{'_error'}
132 0 0 if $debug and $debug & 1
134 0 0 unless ($sftp->_do_io($sftp->{'_timeout'}))
143 0 0 if ($debug and $debug & 1)
146 0 0 if $code == 2
147 0 0 unless $code == 101
150 0 0 if $debug & 8
157 0 0 if (@_)
158 0 0 @_ > 1 ? :
174 0 0 if ${^TAINT}
177 0 0 if @_ & 1
191 0 0 if ($debug)
202 0 0 unless (ref $backend)
203 0 0 $windows ? :
0 0 unless defined $backend
205 0 0 unless $backend =~ /^\w+$/
208 0 0 unless eval "require $backend_class; 1"
214 0 0 if ($debug)
235 0 0 if defined $sftp->{'_timeout'} and $sftp->{'_timeout'} <= 0
238 0 0 if (defined $sftp->{'_fs_encoding'}) { }
239 0 0 if $] < 5.008
249 0 0 if %opts
251 0 0 unless $sftp->{'_error'}
258 0 0 if (not defined $ad or $ad == 2) { }
259 0 0 if $debug and $debug & 4
265 0 0 if ($ad == 0) { }
0 0 elsif ($ad == 1) { }
282 0 0 if $debug and $debug & 4
287 0 0 if (defined $pid)
288 0 0 if defined $sftp->{'ssh_out'} and not $sftp->{'_ssh_out_is_not_dupped'}
289 0 0 if defined $sftp->{'ssh_in'}
290 0 0 if ($windows) { }
291 0 0 if kill 'KILL', $pid
293 0 0 if $debug and $debug & 4
298 0 0 defined $sftp->{'_dirty_cleanup'} ? :
300 0 0 if ($dirty or not defined $dirty) { }
301 0 0 if $debug and $debug & 4
302 0 0 $dirty ? :
303 0 0 if $debug and $debug & 4
304 0 0 if $sig
311 0 0 if $debug and $debug & 4
312 0 0 if $wpr or $! == 10
320 0 0 if waitpid($pid, 0) > 0
321 0 0 if ($! != 4)
322 0 0 if $! != 10
328 0 0 if $debug and $debug & 4
331 0 0 if defined $sftp->{'_pty'}
342 0 0 if $debug and $debug & 4
347 0 0 if (not defined $dbpid or $dbpid == $$ and $dbthread == $thread_generation) { }
351 0 0 if $debug and $debug & 4
360 0 0 if (my $msg = $sftp->_get_msg) { }
0 0 elsif ($sftp->{'_status'} == 7 and $sftp->{'_password_authentication'} and $sftp->{'_password_sent'}) { }
362 0 0 if ($type == 2)
372 0 0 if ($key eq 'vendor-id') { }
0 0 elsif ($key eq 'supported2') { }
414 0 0 if defined $ext and $ext == $version
428 0 0 if $id == $eid
429 0 0 unless (exists $sftp->{'incomming'}{$id})
442 0 0 if ($msg)
448 0 0 if ($type != $etype)
449 0 0 if ($type == 101) { }
452 0 0 defined $str ? :
469 0 0 if (my $msg = $sftp->_get_msg_and_check(102, $eid, $error, $errstr))
479 0 0 unless (defined $rid)
499 0 0 unless defined $rid
501 0 0 defined $attrs ? :
517 0 0 defined $attrs ? :
523 0 0 if (defined $eid)
524 0 0 if (my $msg = $sftp->_get_msg_and_check(101, $eid, $error, $errstr))
527 0 0 if $status == 0
536 0 0 if ${^TAINT}
542 0 0 unless defined $check
544 0 0 if %opts
546 0 0 if (defined $cwd) { }
547 0 0 if ($check) { }
549 0 0 unless defined $cwd
551 0 0 unless my $a = $sftp->stat($cwd)
553 0 0 unless (_is_dir($a->perm))
566 0 0 if defined wantarray
571 0 0 unless @_ == 1
574 0 0 defined $sftp->{'cwd'} ? :
580 0 0 unless @_ >= 2 and @_ <= 4
582 0 0 if ${^TAINT}
586 0 0 unless defined $flags
587 0 0 unless defined $a
596 0 0 if ($debug and $debug & 2)
597 0 0 if (defined $rid) { }
606 0 0 unless defined $rid
609 0 0 if $flags & 4
621 0 0 unless ($fh)
622 0 0 if ($mkpath and $sftp->status == 2) { }
625 0 0 unless $sftp->mkpath($filename, $da, 1)
637 0 0 unless @_ <= 2
638 0 0 if ${^TAINT}
642 0 0 unless defined $path
648 0 0 if ($debug and $debug & 2)
653 0 0 unless defined $rid
662 0 0 unless @_ >= 3 and @_ <= 4
667 0 0 unless ($size)
668 0 0 if defined $size
673 0 0 unless defined $rfid
678 0 0 if (my $msg = $sftp->_get_msg_and_check(103, $id, 5, q[Couldn't read from remote file]))
689 0 0 unless @_ == 4
693 0 0 unless defined $rfid
694 0 0 unless utf8::downgrade($_[3], 1)
699 0 0 if ($sftp->_check_status_ok($id, 16, q[Couldn't write to remote file]))
708 0 0 unless @_ >= 3 and @_ <= 4
712 0 0 unless $sftp->flush($rfh)
714 0 0 if (not $whence) { }
0 0 elsif ($whence == 1) { }
0 0 elsif ($whence == 2) { }
721 0 0 unless my $a = $sftp->stat($rfh)
731 0 0 unless @_ == 2
738 0 0 unless @_ == 2
751 0 0 unless defined $rfid
763 0 0 if (defined $data and length $data) { }
777 0 0 unless ($sftp->_check_status_ok($eid, 16, q[Couldn't write to remote file]))
791 0 0 unless @_ == 3
794 0 0 unless $sftp->flush($rfh, 'in')
795 0 0 unless utf8::downgrade($_[2], 1)
801 0 0 if ($len >= $sftp->{'_write_delay'} or $len and $sftp->{'_autoflush'})
802 0 0 unless $sftp->flush($rfh, 'out')
809 0 0 unless @_ >= 2 and @_ <= 3
815 0 0 unless defined $sftp->_rfid($rfh)
817 0 0 if ($dir ne 'out')
821 0 0 if ($dir ne 'in')
824 0 0 if ($len)
827 0 0 if ($append) { }
828 0 0 unless my $attr = $sftp->stat($rfh)
843 0 0 unless $append
847 0 0 unless $written == $len
858 0 0 unless $sftp->flush($rfh, 'out')
862 0 0 unless defined $rfid
866 0 0 if (defined $len)
867 0 0 if $len < length $$bin
870 0 0 if $len - length($$bin) < $read_ahead
895 0 0 unless my $msg = $sftp->_get_msg_and_check(103, $eid, 5, q[Couldn't read from remote file])
902 0 0 if (length $data < $bsize)
903 0 0 unless (defined $len)
913 0 0 if ($ensure_eof and $sftp->_get_msg_and_check(103, $ensure_eof, 5, q[Couldn't read from remote file]))
922 0 0 if ($sftp->{'_status'} == 1)
924 0 0 if length $$bin
928 0 0 if $sftp->_ok_or_autodie
932 0 0 unless @_ == 3
935 0 0 if ($sftp->_fill_read_cache($rfh, $len))
947 0 0 if @_ < 3
956 0 0 if ($ix >= 0)
965 0 0 unless (length $$bin > $last)
967 0 0 if $sftp->{'_error'}
972 0 0 length $line ? :
978 0 0 unless @_ >= 2 and @_ <= 3
982 0 0 if @_ < 3
983 0 0 if (not defined $sep or $sep eq '')
986 0 0 if $sftp->{'_error'}
993 0 0 if (wantarray)
1004 0 0 unless @_ == 2
1010 0 0 if (length $bin)
1021 0 0 unless @_ <= 2
1022 0 0 if ${^TAINT}
1025 0 0 unless defined $path
1028 0 0 if (my $msg = $sftp->_get_msg_and_check(105, $id, 18, q[Couldn't stat remote link]))
1036 0 0 unless @_ <= 2
1037 0 0 if ${^TAINT}
1040 0 0 unless defined $pofh
1041 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle') ? :
1044 0 0 if (my $msg = $sftp->_get_msg_and_check(105, $id, 1, q[Couldn't stat remote file]))
1063 0 0 unless @_ == 2
1064 0 0 if ${^TAINT}
1084 0 0 unless @_ >= 2 and @_ <= 3
1086 0 0 if ${^TAINT}
1089 0 0 unless defined $attrs
1105 34 0 if (defined $b)
1106 0 0 if (ref $sftp and $sftp->{'_remote_has_volumes'} and $b =~ /^([a-z]\:)(.*)/i)
1113 19 15 if (length $b and $b ne '.')
1114 2 17 if (not $b =~ m[^/] and $a ne '.') { }
1115 0 2 $a =~ m[/$] ? :
1122 0 19 unless length $a
1134 0 0 if $debug and $debug & 4096
1139 0 0 unless @_ >= 2 and @_ <= 4
1141 0 0 if ${^TAINT}
1151 0 0 if ($first) { }
1158 0 0 if $debug and $debug & 8192
1159 0 0 if ($sftp->test_d($p))
1160 0 0 if $debug and $debug & 8192
1163 0 0 unless (length $path)
1172 0 0 if $debug and $debug & 8192
1173 0 0 if ($p =~ m[^(?:.*/)?\.{1,2}$] or $p =~ m[/$]) { }
1174 0 0 if $debug and $debug & 8192
1175 0 0 unless ($sftp->test_d($p))
1176 0 0 if $debug and $debug & 8192
1178 0 0 unless $sftp->{'_error'}
1184 0 0 unless $sftp->mkdir($p, $attrs)
1197 0 0 if $debug and $debug & 32768
1199 0 0 if ($parent)
1201 0 0 unless (@parts)
1212 0 0 if (-e $target)
1213 0 0 unless (-d $target)
1225 0 0 if $debug and $debug and 32768
1226 0 0 unless (CORE::mkdir $target, $perm)
1227 0 0 unless (do { local $!; -d $target })
1234 0 0 if $debug and $debug & 32768
1239 0 0 unless @_ == 3
1240 0 0 if ${^TAINT}
1243 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle') ? :
1267 9 0 $rid_type eq 'any' ? :
0 9 $rid_type eq 'dir' ? :
3 9 $rid_type eq 'file' ? :
1272 0 0 unless @_ == $nargs
1279 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle') ? :
1294 0 0 unless @_ == 2
1298 0 0 unless defined $id
1304 0 0 if ($debug and $debug & 2)
1305 0 0 defined $ok ? :
1313 0 0 unless @_ == 2
1314 0 0 if ${^TAINT}
1319 0 0 unless $sftp->flush($rfh)
1322 0 0 if ($sftp->_close($rfh))
1330 0 0 unless @_ == 2
1331 0 0 if ${^TAINT}
1336 0 0 if ($sftp->_close($rdh))
1344 0 0 unless @_ == 2
1345 0 0 if ${^TAINT}
1350 0 0 unless defined $rdid
1356 0 0 if (my $msg = $sftp->_get_msg_and_check(104, $id, 29, q[Couldn't read remote directory])) { }
1359 0 0 unless my $count = $msg->get_int32
1368 0 0 if $sftp->{'_status'} == 1
1373 0 0 if (wantarray)
1383 0 0 if (wantarray) { }
1385 0 0 if (defined $line)
1397 0 0 unless @_ == 2
1398 0 0 if ${^TAINT}
1404 0 0 if (my $msg = $sftp->_get_msg_and_check(104, $id, $error, "Couldn't get $name for remote '${path}'"))
1407 0 0 if $msg->get_int32 > 0
1445 0 0 unless @_ & 1
1446 0 0 if ${^TAINT}
1452 0 0 if $overwrite and $numbered
1454 0 0 if %opts
1456 0 0 if ($overwrite)
1457 0 0 if $sftp->atomic_rename($old, $new)
1458 0 0 if $sftp->{'_status'} != 8
1465 0 0 if (not $sftp->_rename($old, $new) and $sftp->{'_status'} == 4)
1467 0 0 if ($numbered and $sftp->test_e($new)) { }
0 0 elsif ($overwrite) { }
1474 0 0 if (defined $rp_old and defined $rp_new and $rp_old eq $rp_new) { }
0 0 elsif ($sftp->remove($new)) { }
1488 0 0 unless @_ == 3
1489 0 0 if ${^TAINT}
1493 0 0 unless $sftp->_check_extension('posix-rename@openssh.com', 1, 17, 'atomic rename failed')
1513 0 0 unless @_ == 3
1514 0 0 if ${^TAINT}
1527 0 0 unless @_ == 3
1528 0 0 if ${^TAINT}
1532 0 0 unless $sftp->_check_extension('hardlink@openssh.com', 1, 51, 'hardlink failed')
1551 0 0 if $sftp->{'_error'}
1562 0 0 unless $_[0] =~ s/^(.*)\((\d+)\)((?:\.[^\.]*)?)$/"$1(" . ($2 + 1) . ")$3";/e
1564 0 0 if $debug and $debug & 128
1571 0 0 $@ ? :
1576 0 0 unless @_ >= 2
1577 0 0 if ${^TAINT}
1580 0 0 unless defined $remote
1585 0 0 unless defined $local
1591 0 0 exists $opts{'copy_perm'} ? :
1606 0 0 if defined $perm and defined $copy_perm
1608 0 0 if $numbered and $overwrite || $resume || $append
1610 0 0 if ($resume or $append)
1611 0 0 if $resume and $append
1612 0 0 if $atomic
1613 0 0 if $overwrite
1616 0 0 if ($local_is_fh)
1618 0 0 if $resume
1619 0 0 if $overwrite
1620 0 0 if $numbered
1621 0 0 if $dont_save
1622 0 0 if $atomic
1624 0 0 if %opts
1626 0 0 if ($resume and $conversion)
1631 0 0 unless defined $overwrite or $local_is_fh or $numbered or $append
1632 0 0 unless defined $perm or defined $copy_perm or $local_is_fh
1633 0 0 unless defined $copy_time or $local_is_fh
1634 0 0 unless defined $mkpath
1635 0 0 unless defined $cleanup
1641 0 0 $a ? :
1642 0 0 unless defined $size
1644 0 0 if ($copy_time and not defined $atime)
1645 0 0 if ($best_effort) { }
1649 0 0 if $sftp->_ok_or_autodie
1655 0 0 defined $perm ? :
0 0 unless defined $umask
1656 0 0 if ($copy_perm)
1657 0 0 if (defined $rperm) { }
0 0 elsif ($best_effort) { }
1664 0 0 if $sftp->_ok_or_autodie
1669 0 0 if defined $perm
1673 0 0 if ($resume and $resume eq 'auto')
1675 0 0 if (defined $mtime)
1676 0 0 if (my(@lstat) = CORE::stat $local)
1688 0 0 if ($dont_save) { }
1690 0 0 unless defined $rfh
1693 0 0 unless ($local_is_fh or $overwrite or $append or $resume or $numbered)
1694 0 0 if (-e $local)
1701 0 0 if ($atomic)
1706 0 0 if $debug and $debug & 128
1709 0 0 if ($resume)
1710 0 0 if (CORE::open $fh, '+<', $local)
1714 0 0 if ($askoff < 0) { }
1721 0 0 if ($size >= 0 and $askoff > $size)
1726 0 0 if $size == $askoff
1734 0 0 unless defined $rfh
1736 0 0 unless (defined $fh)
1737 0 0 if ($local_is_fh) { }
1741 0 0 unless $lstart and $lstart > 0
1745 0 0 if $append
1746 0 0 if $numbered or not $overwrite || $append
1747 0 0 if $overwrite
1748 0 0 defined $perm ? :
1750 0 0 if $mkpath
1752 0 0 if sysopen $fh, $local, $flags, $open_perm
1753 0 0 unless ($numbered and -e $local)
1760 0 0 if ref $numbered
1762 0 0 if $append
1766 0 0 if (defined $perm)
1770 0 0 unless (eval { do { CORE::chmod($perm, $local) > 0 } })
1771 0 0 $@ ? :
1774 0 0 if ($error and not $best_effort)
1775 0 0 unless $resume or $append
1786 0 0 unless defined $rfid
1794 0 0 $size == -1 ? :
1818 0 0 if $slow_start
1827 0 0 unless ($msg)
1828 0 0 if $sftp->{'_status'} == 1
1835 0 0 if ($roff != $loff or not $len)
1842 0 0 unless ($safe_block_size)
1843 0 0 if ($len > $sftp->{'_min_block_size'})
1845 0 0 if ($len < $block_size)
1855 0 0 if $converter
1857 0 0 if (length $data and defined $cb)
1864 0 0 if $sftp->{'_error'}
1867 0 0 if (length $data and not $dont_save)
1868 0 0 unless (print $fh $data)
1878 0 0 if $sftp->{'_error'}
1882 0 0 if ($converter)
1887 0 0 if (length $data and defined $cb)
1891 0 0 if $sftp->{'_error'}
1894 0 0 if (length $data and not $dont_save)
1895 0 0 unless (print $fh $data)
1904 0 0 if (defined $cb)
1910 0 0 if $sftp->{'_error'}
1911 0 0 if (length $data and not $dont_save)
1912 0 0 unless (print $fh $data)
1920 0 0 unless ($dont_save)
1921 0 0 unless ($local_is_fh or CORE::close $fh)
1930 0 0 if ($copy_time)
1931 0 0 unless (CORE::utime $atime, $mtime, $local or $best_effort)
1938 0 0 if ($atomic)
1939 0 0 if (not $overwrite) { }
1946 0 0 if (link $local, $atomic_local)
1951 0 0 unless (-e $atomic_local)
1952 0 0 if (sysopen my $lock, $atomic_local, 193, 384)
1959 0 0 unless (-e $atomic_local)
1965 0 0 unless ($numbered)
1975 0 0 unless (CORE::rename $local, $atomic_local)
1981 0 0 if ref $atomic_numbered
1985 0 0 if ($cleanup and $sftp->{'_error'})
1987 0 0 if $atomic_cleanup
1996 0 0 unless @_ == 2
1997 0 0 if ${^TAINT}
2003 0 0 unless my $rfh = $sftp->open($name)
2010 0 0 unless @_ >= 2
2011 0 0 if ${^TAINT}
2014 0 0 unless defined $local
2019 0 0 unless (defined $remote)
2020 0 0 if $local_is_fh
2029 0 0 unless defined $copy_perm
2045 0 0 if defined $perm and defined $umask
2047 0 0 if defined $perm and $copy_perm
2049 0 0 if $resume and $append
2051 0 0 if $resume and $overwrite
2053 0 0 if $numbered and $overwrite || $resume || $append
2055 0 0 if $atomic and $resume || $append
2058 0 0 if %opts
2060 0 0 unless defined $overwrite or $numbered
2061 0 0 unless defined $perm or defined $copy_perm or $local_is_fh
2062 0 0 unless defined $copy_time or $local_is_fh
2063 0 0 unless defined $late_set_perm
2064 0 0 unless defined $cleanup
2065 0 0 unless defined $mkpath
2068 0 0 if (defined $perm) { }
2072 0 0 unless defined $umask
2077 0 0 if ($local_is_fh) { }
2082 0 0 unless (CORE::open $fh, '<', $local)
2095 0 0 if ((undef, undef, $lmode, undef, undef, undef, undef, $lsize, $latime, $lmtime) = eval { do { no warnings; CORE::stat $fh } }) { }
0 0 elsif ($copy_perm or $copy_time) { }
0 0 elsif ($resume and $resume eq 'auto') { }
2104 0 0 defined $lsize ? :
0 0 if $debug and $debug & 16384
2108 0 0 if ($local_is_fh and defined $lsize)
2110 0 0 if $tell and $tell > 0
2119 0 0 if $debug and $debug & 16384
2124 0 0 if $copy_perm
2126 0 0 if defined $perm
2134 0 0 if ($resume or $append)
2139 0 0 if ($rattrs) { }
2140 0 0 if ($resume and $resume eq 'auto' and $rattrs->mtime <= $lmtime) { }
2141 0 0 if $debug and $debug & 16384
2147 0 0 if $debug and $debug & 16384
2151 0 0 if ($append)
2152 0 0 unless $sftp->{'_status'} == 2 or $sftp->_ok_or_autodie
2162 0 0 if ($writeoff) { }
2164 0 0 if ($resume)
2165 0 0 if $debug and $debug & 16384
2166 0 0 if ($converter) { }
0 0 elsif ($local_is_fh) { }
2175 0 0 if ($delta <= $len) { }
2176 0 0 if $debug and $debug & 16384
2182 0 0 if ($eof_t)
2188 0 0 unless (defined $read)
2193 0 0 if defined $lsize
2194 0 0 unless utf8::downgrade($converted_input, 1)
2196 0 0 unless $read
2207 0 0 $off < 16384 ? :
2208 0 0 if ($read) { }
2209 0 0 if $debug and $debug & 16384
2213 0 0 defined $read ? :
2222 0 0 if (defined $lsize and $writeoff > $lsize)
2227 0 0 unless (CORE::seek $fh, $writeoff, 0)
2233 0 0 if (defined $lsize and $writeoff == $lsize)
2234 0 0 if (defined $perm and $rattrs->perm != $perm)
2241 0 0 unless $rfh = $sftp->open($remote, 2)
2245 0 0 if ($atomic)
2248 0 0 if (not $numbered || $overwrite and $sftp->test_e($remote))
2259 0 0 if $debug and $debug & 128
2262 0 0 if ($numbered) { }
2269 0 0 if $rfh or $sftp->{'_status'} != 4 or not $sftp->test_e($remote)
2273 0 0 if $rfh and ref $numbered
2281 0 0 $overwrite ? :
2287 0 0 if $rfh or $rep or not $overwrite or $sftp->{'_status'} != 3
2289 0 0 if $debug and $debug & 2
2296 0 0 unless $sftp->_ok_or_autodie
2309 0 0 if (defined $perm and not $late_set_perm)
2310 0 0 unless $sftp->_best_effort($best_effort, 'setstat', $rfh, $attrs)
2314 0 0 unless defined $rfid
2318 0 0 if $append or not defined $lsize
2325 0 0 if (not $eof and @msgid < $queue_size)
2327 0 0 if ($converter) { }
2330 0 0 unless ($read)
2331 0 0 unless (defined $read)
2342 0 0 unless utf8::downgrade($input, 1)
2348 0 0 if $eof_t and not $len
2351 0 0 if $debug and $debug & 16384
2356 0 0 if ($len) { }
2357 0 0 if $debug and $debug & 16384
2359 0 0 unless utf8::downgrade($data, 1)
2362 0 0 if $debug and $debug & 16384 and length $data != $len
2366 0 0 unless (defined $len)
2377 0 0 if (defined $cb)
2378 0 0 if $nextoff > $lsize
2381 0 0 if $sftp->{'_error'}
2383 0 0 unless utf8::downgrade($data, 1)
2389 0 0 if ($len)
2390 0 0 if ($sparse and $data =~ /^\x{00}*$/s) { }
2392 0 0 if $debug and $debug & 16384
2395 0 0 if $debug and $debug & 16384
2406 0 0 if $eof and not @msgid
2408 0 0 unless $eof or @msgid >= $queue_size or $sftp->_do_io(0)
2413 0 0 unless ($sftp->_check_status_ok($id, 16, q[Couldn't write to remote file]))
2420 0 0 unless $local_is_fh
2425 0 0 if $last_block_was_zeros and not $sftp->{'_error'}
2429 0 0 if $sftp->{'_error'}
2433 0 0 if ($copy_time or $late_set_perm and defined $perm)
2434 0 0 unless $late_set_perm and defined $perm
2435 0 0 if $copy_time
2436 0 0 unless $sftp->_best_effort($best_effort, 'setstat', $remote, $attrs)
2439 0 0 if ($atomic)
2440 0 0 unless $sftp->rename($remote, $atomic_remote, 'overwrite', $overwrite, 'numbered', $atomic_numbered)
2446 0 0 if ($cleanup and $sftp->{'_error'})
2455 0 0 unless @_ >= 3
2456 0 0 if ${^TAINT}
2462 0 0 if %opts
2465 0 0 unless (CORE::open $fh, '<', \$_[1])
2473 0 0 unless @_ >= 1
2474 0 0 if ${^TAINT}
2477 0 0 @_ & 1 ? :
2488 0 0 if ($cheap and ref $opts{'wanted'} eq 'Regexp' and not defined $opts{'no_wanted'}) { }
2497 0 0 if defined $wanted
2500 0 0 if %opts
2503 0 0 if $follow_links or $realpath or $wanted and not $delayed_wanted
2506 0 0 $max_queue_size < 2 ? :
2508 0 0 unless defined $dir
2512 0 0 unless defined $rdh
2515 0 0 unless defined $rdid
2527 0 0 unless my $msg = $sftp->_get_msg_and_check(104, $id, 29, "Couldn't read directory '${dir}'")
2530 0 0 unless my $count = $msg->get_int32
2532 0 0 if ($cheap) { }
2535 0 0 if not defined $cheap_wanted or $fn =~ /$cheap_wanted/
2551 0 0 if ($follow_links and _is_lnk($a->perm))
2553 0 0 if ($a = $sftp->stat($sftp->join($dir, $fn))) { }
2561 0 0 if ($realpath)
2563 0 0 if (defined $rp) { }
2571 0 0 if (not $wanted or $delayed_wanted or &$wanted($sftp, $entry))
2572 0 0 $names_only && !$delayed_wanted ? :
2576 0 0 if $queue_size < $max_queue_size
2578 0 0 if $sftp->{'_status'} == 1
2580 0 0 if $rdh
2582 0 0 unless ($sftp->{'_error'})
2583 0 0 if ($delayed_wanted)
2585 0 0 if $names_only
2587 0 0 defined $_->{'realpath'} ? :
2590 0 0 if ($ordered)
2591 0 0 if ($names_only) { }
2600 0 0 if $sftp->{'_autodie'}
2605 0 0 unless @_ >= 2
2606 0 0 if ${^TAINT}
2611 0 0 if $on_error
2615 0 0 if %opts
2626 0 0 if (_is_dir($e->{'a'}->perm)) { }
2630 0 0 if (not $wanted or &$wanted($sftp, $e))
2631 0 0 if ($sftp->remove($fn)) { }
2645 0 0 if (not $wanted or &$wanted($sftp, $e))
2646 0 0 if ($sftp->rmdir($e->{'filename'})) { }
2659 0 0 unless @_ >= 3
2664 0 0 if $overwrite and $numbered
2666 0 0 if %opts
2668 0 0 unless defined $overwrite or $numbered
2670 0 0 unless my $a = $sftp->lstat($remote)
2671 0 0 unless (_is_lnk($a->perm))
2677 0 0 unless my $link = $sftp->readlink($remote)
2680 0 0 if ($numbered) { }
0 0 elsif (-e $local) { }
2684 0 0 if ($overwrite) { }
2694 0 0 unless (eval { do { CORE::symlink $link, $local } })
2699 0 0 if ref $numbered
2705 0 0 unless @_ >= 3
2710 0 0 if $overwrite and $numbered
2712 0 0 if %opts
2714 0 0 unless defined $overwrite or $numbered
2716 0 0 unless (defined $perm)
2721 0 0 unless (_is_lnk($perm))
2727 0 0 unless (defined $target)
2736 0 0 if ($sftp->{'_error'} and $sftp->{'_status'} == 4)
2738 0 0 if ($numbered and $sftp->test_e($remote)) { }
0 0 elsif ($overwrite and $sftp->_remove_save_status($remote)) { }
2749 0 0 if ref $numbered
2754 0 0 unless @_ >= 2
2755 0 0 if ${^TAINT}
2758 0 0 unless defined $remote
2759 0 0 unless defined $local
2763 0 0 exists $opts{'copy_perm'} ? :
2767 0 0 if $on_error
2780 0 0 if ($get_opts{'resume'} and $get_opts{'conversion'})
2788 0 0 if %opts
2796 0 0 unless defined $copy_perm
2797 0 0 unless defined $copy_time
2798 0 0 unless defined $mkpath
2805 0 0 if (not $wanted or &$wanted($sftp, $e))
2807 0 0 if ($fn =~ /$reremote/) { }
2809 0 0 if ${^TAINT}
2810 0 0 if (-d $lpath) { }
2817 0 0 $copy_perm ? :
2818 0 0 if (CORE::mkdir $lpath, $perm or $mkpath and $sftp->_mkpath_local($lpath, $perm))
2837 0 0 unless (_is_dir($e->{'a'}->perm))
2838 0 0 if (not $wanted or &$wanted($sftp, $e))
2840 0 0 if ($fn =~ /$reremote/) { }
2841 0 0 length $1 ? :
2843 0 0 if ${^TAINT}
2844 0 0 if (_is_lnk($e->{'a'}->perm) and not $ignore_links) { }
0 0 elsif (_is_reg($e->{'a'}->perm)) { }
2845 0 0 if ($sftp->get_symlink($fn, $lpath, %get_symlink_opts))
2853 0 0 if ($newer_only and -e $lpath and (stat _)[9] >= $e->{'a'}->mtime) { }
2859 0 0 if ($sftp->get($fn, $lpath, 'copy_perm', $copy_perm, 'copy_time', $copy_time, %get_opts))
2869 0 0 $ignore_links ? :
2889 0 0 unless @_ >= 2
2890 0 0 if ${^TAINT}
2894 0 0 unless defined $local
2895 0 0 unless defined $remote
2900 0 0 exists $opts{'copy_perm'} ? :
2905 0 0 if $on_error
2921 0 0 if defined $perm and defined $umask
2923 0 0 if defined $perm and $copy_perm
2926 0 0 if %opts
2933 0 0 if ($local =~ m[^\./?$]) { }
2941 0 0 unless defined $copy_perm
2942 0 0 unless defined $copy_time
2943 0 0 unless defined $mkpath
2946 0 0 if (defined $perm) { }
2950 0 0 unless defined $umask
2954 0 0 if ($on_error)
2968 0 0 if (not $wanted or &$wanted($lfs, $e))
2970 0 0 if $debug and $debug & 32768
2971 0 0 if ($fn =~ /$relocal/) { }
2973 0 0 if $debug and $debug & 32768
2975 0 0 if (defined $perm) { }
0 0 elsif ($copy_perm) { }
2981 0 0 if ($sftp->mkdir($rpath, $a))
2985 0 0 if ($mkpath and $sftp->status == 2)
2988 0 0 if ($sftp->mkpath($rpath, $a))
2994 0 0 if ($sftp->test_d($rpath))
3012 0 0 unless (_is_dir($e->{'a'}->perm))
3013 0 0 if (not $wanted or &$wanted($lfs, $e))
3015 0 0 if $debug and $debug & 32768
3016 0 0 if ($fn =~ /$relocal/) { }
3019 0 0 if (_is_lnk($e->{'a'}->perm) and not $ignore_links) { }
0 0 elsif (_is_reg($e->{'a'}->perm)) { }
3020 0 0 if ($sftp->put_symlink($fn, $rpath, %put_symlink_opts))
3029 0 0 if ($newer_only and $ra = $sftp->stat($rpath) and $ra->mtime >= $e->{'a'}->mtime) { }
3036 0 0 $copy_perm ? :
0 0 defined $perm ? :
0 0 if ($sftp->put($fn, $rpath, defined $perm ? ('perm', $perm) : ($copy_perm ? ('perm', $e->{'a'}->perm & $mask) : ('copy_perm', 0, 'umask', $umask)), 'copy_time', $copy_time, %put_opts))
3049 0 0 $ignore_links ? :
3069 0 0 unless @_ >= 2
3070 0 0 if ${^TAINT}
3074 0 0 unless defined $remote
3077 0 0 if $on_error
3091 0 0 if %opts
3100 0 0 if (_is_dir($perm)) { }
3108 0 0 if defined $localdir
3111 0 0 if (_is_lnk($perm)) { }
3112 0 0 if $ignore_links
3119 0 0 unless $sftp->{'_error'}
3126 0 0 unless @_ >= 2
3130 0 0 unless defined $local
3133 0 0 if $on_error
3147 0 0 if %opts
3157 0 0 if (_is_dir($perm)) { }
3164 0 0 if defined $remotedir
3167 0 0 if (_is_lnk($perm)) { }
3168 0 0 if $ignore_links
3175 0 0 unless $sftp->{'_error'}
3182 0 0 unless @_ == 2
3183 0 0 if ${^TAINT}
3188 0 0 unless $sftp->_check_extension('fsync@openssh.com', 1, 53, 'fsync failed, not implemented')
3196 0 0 if ($sftp->_check_status_ok($id, 53, q[Couldn't fsync remote file]))
3205 0 0 unless @_ == 2
3206 0 0 if ${^TAINT}
3209 0 0 ref $pofh && UNIVERSAL::isa($pofh, 'Net::SFTP::Foreign::FileHandle') ? :
3213 0 0 unless $sftp->_check_extension($extension, 2, 48, 'statvfs failed, not implemented')
3222 0 0 if (my $msg = $sftp->_get_msg_and_check(201, $id, 48, q[Couldn't stat remote file system]))
3249 0 0 if (@_) { }
3262 0 0 unless $self->_check
3266 0 0 if (wantarray) { }
3268 0 0 unless @ret
3273 0 0 unless defined $ret
3310 0 0 if defined *{shift();}{'ARRAY'}->[0]
3317 0 0 unless $self->_check
3341 0 0 unless defined $flag
3342 0 0 if (@_)
3343 0 0 if (shift()) { }
3350 0 0 $st->[3] & $flag ? :
3364 0 0 if ($autoloaded) { }
3396 0 0 unless $self->_check
3399 0 0 unless defined $offset
3400 0 0 if $offset < 0
3401 0 0 unless defined $length
3406 0 0 unless defined $ret
3412 0 0 unless $self->_check
3415 0 0 unless defined $_[1]
3417 0 0 if ($offset > length $_[1])
3421 0 0 if ($len == 0)
3430 0 0 if (length $$bin)
3436 0 0 if $sftp->{'_status'} == $sftp->SSH2_FX_EOF
3443 0 0 unless $self->_check
3446 0 0 unless defined $ret
3467 0 0 if $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3468 0 0 if ($self->_check and $sftp)
3508 0 0 if $Net::SFTP::Foreign::debug and $Net::SFTP::Foreign::debug & 4
3510 0 0 if ($self->_check and $sftp)