Blanca Hdez
Blanca Hdez

Reputation: 3563

List files in a remote folder given the URL

I have a questions, and I would love you to try to answer it.
Is it possible to get the list of files from a remote folder in java, knowing just the URL???
for example:

http://localhost/img get all the images names in this directory.

Thanks in advance

Upvotes: 0

Views: 1274

Answers (1)

Mitchel Sellers
Mitchel Sellers

Reputation: 63136

When you are talking about a remote folder, it depends on how you are accessing it.

If it is via a network share, such as \localhost\mypath AND you have access to browse the files, you will be able to do so, just like you would with a local directory.

However, if you are trying to browse a directory on a web server, the web server would have to give you directory browsing ability for you to work with it.

Upvotes: 1

Related Questions