Thanks alot for the patch! I have integrated it into Net::xFTP along with similar functionality for Net::SSH2::SFTP and local files. Also fixed a couple of minor bugs with the size() and ls() fns! (See Changes). The new version (v0.21 is now available on my website (
http://home.mesh.net/turnerjw/jim/). Please review, then I'll post it to CPAN.
Thanks again for your support of Net::xFTP!
Jim Turner
--- On Tue, 9/8/09, Matz.Rob via RT <bug-Net-xFTP@rt.cpan.org> wrote:
From: Matz.Rob via RT <bug-Net-xFTP@rt.cpan.org>
Subject: RE: [rt.cpan.org #47870] feature request
To:
Date: Tuesday, September 8, 2009, 10:14 AM
Queue: Net-xFTP
Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=47870 >
Here is the mdtm component I added for 0.17 which works for NET::SFTP
0.10
sub mdtm
{
my $self = shift;
my $path = shift;
my $ok;
if ($self->{pkg} =~ /Net::FTP/o && $haveFTP)
{
return $self->{xftp}->mdtm($path);
}
elsif ($self->{pkg} =~ /Net::SFTP/o && $haveSFTP)
{
$path = $self->{cwd} . '/' . $path unless ($path =~
m#^(?:[a-zA-Z]\:|\/)#o);
eval { $ok = $self->{xftp}->do_stat($path) };
unless (defined($ok) && $ok)
{
$self->{xftp_lastmsg} = $@;
return undef;
}
return $ok->mtime();
}
elsif (!$self->{pkg})
{
$path = $self->{cwd} . '/' . $path unless ($path =~
m#^(?:[a-zA-Z]\:|\/)#o);
eval { (undef, undef, undef, undef, undef, undef, undef,
$ok) = stat($path) };
return $@ ? undef : $ok;
}
return;
}
Show quoted text-----Original Message-----
From: Jim Turner via RT [mailto:bug-Net-xFTP@rt.cpan.org]
Sent: Monday, September 07, 2009 8:09 PM
To: Matz.Rob
Subject: [rt.cpan.org #47870] feature request
<URL:
https://rt.cpan.org/Ticket/Display.html?id=47870 >
Do you know a way to do this in Net::SFTP? If so, plz let me know.
Just looking at it, I don't see how to do it. The idea of this module
is to include functions / capabilities common to both Net::FTP and
Net::SFTP.
Regards,
Jim
On Tue Jul 14 09:11:07 2009, Matz.Rob@mbsinsight.com wrote:
> I have been manually updating the module with a mdtm (modtime)
function
> so that I may use the same coding for ftp and sftp. Would you please
be
> able to incorporate that feature into new releases?
>
>
>
> Rob Matz
>
> UNIX Administrator
>
>
>
>
>
> 570 South Research Place
>
> Central Islip, NY 11722
>
> Ph: 631.851.5136
>
> Fax: 631.851.1338
>
> Matz.Rob@mbsinsight.com
>
>
>
>
>