Skip Menu |

This queue is for tickets about the Net-FTPSSL CPAN distribution.

Report information
The Basics
Id: 49376
Status: resolved
Priority: 0/
Queue: Net-FTPSSL

People
Owner: Nobody in particular
Requestors: brentd42 [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.12



Subject: mdtm method support enhancement request
Date: Wed, 2 Sep 2009 14:12:56 -0600
To: "bug-net-ftpssl [...] rt.cpan.org" <bug-net-ftpssl [...] rt.cpan.org>
From: Brent Davis <brentd42 [...] hotmail.com>
The CPAN Net::FTP module supports an "mdtm" method to return the modification time of the specified file on the remote server. For compatibility with Net::FTP, it would be desirable for Net::FTPSSL to also support a functionally equivalent mdtm method. BTW, great job with recent Net::FTPSSL fixes and enhancements!!! I've been able to eliminate 8 out of 11 patches that I've developed/applied locally for the 0.04 release (and am submitting bug reports like this one on the remaining 3 :-) ). Show quoted text
_________________________________________________________________ With Windows Live, you can organize, edit, and share your photos. http://www.windowslive.com/Desktop/PhotoGallery
There is an undocmemted _mdtm() function available for this purpose. It's useage is as follows: $timestamp = $ftps->_mdtm ( $remote_filemame ); Where $timestamp is the # of seconds since Jan 1, 1970 similar to what was returned by (stat($file))[9] for a local file's timestamp. Not the YYYYMMDDHHMMSS returned by the FTP MDTM command. My code did the conversion for you since I didn't find this text version very useful and actually got in the way when I implemented the PreserveTimestamp tag for file transfers. But if you want the text version, you can always grab it from $ftps->message() yourself. The inverse boolean function $ftps->_mfmt ( $timestamp, $remote_filename ) is also present. Using the same reasoning as above for using a timestamp. Neither function will call croak on failure if you turn Croak on in your code. I'll try to remember adding them to the POD text to be more visible in v0.12. If you actually want to work with the text dates let me know & I'll add wrapper methods to work with the more cumbersome YYYYMMDDHHMMSS formats. Curtis
Your enhancement requests have been added. Curtis