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.getSharedFolders){
System.out.println(share.getName());
}
Is there a way in which this can be accomplished?
I want to make something similar to windows network explorer and I need to get all the shared folders under a specific IP so I can ggenerate a tree.
With the first level shared folders I can easely get the lower levels like this
for(File f : new File("//10.0.0.9/d").listFiles()){
System.out.println(f.getName());
Intellectual property (IP) refers to creations of the mind, such as inventions; literary and artistic works; designs; and symbols, names and images used in commerce.
Selling Your Intellectual PropertyCopyrights are able to be sold or transferred as long as the transaction is done in writing. Many copyrights When completing the sale, it is important to have a proper Copyright Assignment agreement done to ensure the rights are transferred from one entity to the next.
Patents, trademarks, copyrights, and trade secrets are valuable assets of the company and understanding how they work and how they are created is critical to knowing how to protect them.
Intellectual property (IP) and other intangible assets now account for over 80 percent of company value in the S&P 500, by some estimates.
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 you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With