Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Net::FTP changes timestamps

by shenme (Priest)
on Feb 16, 2005 at 05:41 UTC ( [id://431446]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Net::FTP changes timestamps
in thread Net::FTP changes timestamps

Net::FTP is not magic. Try the same steps using a plain command line FTP client and you'll see that changed timestamps are normal for FTP. Doing a 'put' or 'get' only transfers the file and does not update file time on the receiving end. Plain FTP servers and clients just slap the current time onto the transferred file.

Some FTP servers and clients allow an extension to the MDTM command to allow you to set the remote file's timestamp as a separate step after uploading the file. But if the FTP server is ancient it probably doesn't support that command.

When receiving a file locally you must also get and process the remote directory listing and extract the timestamp to be set. I'm not sure if module File::Listing will help you with the output from dir() but you could look at it.

Replies are listed 'Best First'.
Re^4: Net::FTP changes timestamps
by Anonymous Monk on Feb 16, 2005 at 19:48 UTC
    The thing is that I've tested this with just our command line ftp, and it maintains the original timestamps, which is why I thought it was curious that Net::FTP did not. In any case, thanks for your replies.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://431446]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found