美文网首页
获取Windows共享目录文件

获取Windows共享目录文件

作者: ShrJanLan | 来源:发表于2021-11-23 18:03 被阅读0次

    使用jcifs-1.3.3.jar

    String host = "host";
    String username = "username";
    String password = "password";
    String url = "smb:/"+host+"/ShareDirectory";
    NtlmPasswordAuthentication npa = new NtlmPasswordAuthentication(host,username,password);
    SmbFile file = new SmbFile(url,npa);
    System.out.println(file.exists());
    

    相关文章

      网友评论

          本文标题:获取Windows共享目录文件

          本文链接:https://www.haomeiwen.com/subject/gqowtrtx.html