in reply to Net::SSH2::SFTP stat function
Also, instead of Net::SSH2, you should try using Net::SFTP::Foreign that has methods to mirror full file systems trees:use Fcntl ':mode'; my $mode = ...; if (S_ISDIR($mode)) { # directory ... } elsif (S_ISLNK($mode)) { # link ... } elsif (...
use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign->new($host); $sftp->error and die "unable to connect to remote host: ".$sftp->error +; $sftp->rget($remote_dir, $local_dir);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SSH2::SFTP stat function
by james_ (Novice) on Oct 02, 2008 at 12:29 UTC | |
by salva (Canon) on Oct 02, 2008 at 12:47 UTC | |
by Anonymous Monk on Oct 02, 2008 at 13:25 UTC |