List the content of a web folder in iOS

Discussion in 'iOS Programming' started by gameplayerxp, Jun 16, 2011.

  1. gameplayerxp macrumors newbie

    gameplayerxp

    Joined:
    Dec 1, 2010
    Location:
    Sydney
    #1
    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
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    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.
     
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    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.
     
  4. gameplayerxp thread starter macrumors newbie

    gameplayerxp

    Joined:
    Dec 1, 2010
    Location:
    Sydney
    #4
    Thanks guys. Now I know the direction I should go :)
     

Share This Page