How to list all the available shared folders under a specific IP Address?
Mock code:
IP ip = new IP(\"10.0.0.9\");
for(File share : ip.getSharedFold
You can get the list of shares using the The Java CIFS Client Library and in particular the SmbFile.list method. Here is a small illustration of how to use this API:
SmbFile server = new SmbFile("smb://server/");
String[] shares = server.list();
Java from out of the box does not support what you are trying to do. You need to use libraries such as JCIFS to do this.
One easy/cludgy way out though would be to make sure that you have a drive mapping ( if windows or nfs/smb mount for other OSs) to the location and then treat it as a local file - using java.io
APIs.
If the files are accessible through the server IP address (network wise and permission wise) then sure you can list them all recursively by doing the following:
"//10.0.0.9/folder"