Shares Under IP

前端 未结 3 670
故里飘歌
故里飘歌 2020-12-10 17:48

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         


        
3条回答
  •  囚心锁ツ
    2020-12-10 18:22

    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.

提交回复
热议问题