Skip Menu |

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

Report information
The Basics
Id: 49377
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: size method support enhancement request
Date: Wed, 2 Sep 2009 14:13:32 -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 a "size" method to return the size in bytes on the remote server of the specified file. For compatibility with Net::FTP, it would be desirable for Net::FTPSSL to also support a functionally equivalent size method. Show quoted text
_________________________________________________________________ HotmailĀ® is up to 70% faster. Now good news travels really fast. http://windowslive.com/online/hotmail?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_faster:082009
You can use almost any FTP command not directly supported by the Net::FTPSSL class via the boolean quot() command. So in order to get the remote file's size you could do: if ($ftps->quot ("SIZE", $remote_file)) { $size = $1 if ( $ftps->message()=~ m/\d+\s+(\d+)/ ); } Just be aware that the size returned for text files may not match the actual size when the file is downloaded to your system. That is an OS specific issue. See the POD text for more details on this command. I'll consider this enhancement for v0.12 when I have time to work on it again.
Your requested size function has been added. Curtis