开发者

Get HTTP directory listing in Objective-C

I am making a Mac application in Objective-C and I want to show a list of files from a directory on my webspace via HTTP (unless an alternative 开发者_运维问答method is recommended).

Then from this list the user can click a button and download the chosen file.

My question is, how would you recommend I approach this? I haven't delved into HTTP with Objective-C before, downloading or anything.


Take a look at the WebView component in the WebKit framework. If you're showing all files in your Web site directory then you can set directory enabling to true on it and then just fetch the page with WebView. If you need to filter the returned list then you can do so in the WebView delegate methods.

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜