【发布时间】:2021-03-27 11:13:13
【问题描述】:
我正在尝试编写一个 python 脚本来从 FTP 服务器下载文件,下面的代码对我有用,但我很好奇有没有办法从 FTP 下载带有原始modify time 的文件。用python可以吗?
Example: FileZilla have a feature to download the files with the original date time
with open(fileName,'wb') as write
def writeData(chunk):
fwrite.write(chunk)
ftp_client.retrbinary('RETR {}'.format(downFileName), writeData)
【问题讨论】:
-
FileZilla 只是在之后设置时间戳。请参阅上面的链接以了解如何做到这一点。