Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gameplayerxp

macrumors newbie
Original poster
Dec 1, 2010
23
0
Sydney
Hi,

Is there any way to list the content of a web folder? Just like what we can see in a web browser. Thanks.

-Ray
 
Use a NSURLConnection to download the text the server provides for the directory listing (most likely an HTML file), parse that yourself and present it however you want.

Or embed a UIWebView and point that at the URL.
 
There is no such thing as a web folder. In fact there are no files on the internet. All that exist are services.

Your iOS app can connect to services and consume whatever they provide. http doesn't provide a way to list files. ftp provides a way to ask an ftp server for a list of files. WebDAV is a service built on http that (I think) provides a way to list files. I believe that Apache, a web server, can provide a list of files in an html page. But it does so in a way that doesn't conform to any standard.

If you control the web site you could provide a file on the server that has the information that your app needs.

There is no simple solution to what you're asking.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.