WWW get files name to a folder

Hi, how can I get the names of files in a folder?

Now i use this:

string[] files = Directory.GetFiles(url);

But if I wanted to point to a folder online?

Thanks

The HTTP protocol doesn’t have any such a feature. Some HTTP servers specifically create a directory listing HTML page to navigate through subfolders but generally there’s no way to query the content of a web resource in a standardised way. You would need a server side script that collects the folder information on the server and returns that information as JSON or any other machine readable format.

Keep in mind that an URL path doesn’t need to match any actual folder structure. Take UnityAnswers for example. “/questions/” is not an actual folder but just an indication for the server what kind of resource you want to view. The next part is the question ID (post ID) which is taken from a database. The actual HTML page that is returned at the end is generated on the fly.