in reply to Net::SSH2::SFTP stat function

<untested>

Can't you do a ls -la and get a list? It will tell you if something is a directory or link.

my $chan = $ssh2->channel(); $chan->blocking(0); $chan->exec('ls -la'); while (<$chan>){ print; # regex the output here to determine what to get }

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^2: Net::SSH2::SFTP stat function
by james_ (Novice) on Oct 02, 2008 at 12:20 UTC
    I could do the ls -la, but I'm not supposed to use external (i.e. OS) functions in this code, only native Perl functions, to ensure portability.

    Otherwise I'd definitely use SFTP::Foreign...