#!/usr/bin/perl
BEGIN {push(@INC,'./perl-lib')};
use Net::SFTP::Foreign;
print "Sample sftp Perl \n";
my $HOST = 'ユーザ名@ドメイン';
my $PASS = '*******';
my $MORE = [-o => 'StrictHostKeyChecking no'];
my $sftp = Net::SFTP::Foreign->new($HOST,password=>$PASS,more=>$MORE);
my $ls = $sftp->ls("./www");
foreach my $file(@$ls){
my $filename = $file->{filename};
my $mtime = $file->{a}->mtime;
print "$filename \t";
print "$mtime \n";
}
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world.");
}
}