开发者

Get file date on FTP download

I'm using some sample code from Apple: "SimpleFTPSample", to make connection w开发者_如何转开发ith a ftp server. I already have get and put working, and I'm using:

_fileSize = [[self.networkStream propertyForKey:(id)kCFStreamPropertyFTPResourceSize] integerValue];

to get the file size before the download starts.

And I would like to know if there is some similar way of getting the modification date of the file (in sever), just to be able to compare him, to know if I make upload or download.

thanks in advance!


Take a look at CFFTPSample. It shows how to use CFFTPCreateParsedResourceListing() to get a CFDateRef for when files in the directory were modified. Unfortunately it's a fairly arduous procedure, but there doesn't seem to be an easy-to-use FTP library available for the iPhone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜