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
精彩评论