I use https://github.com/hierynomus/smbj for samba access. I want get only the subfolders of my target directory. Whith following code I get "..", "." and all the files - is there an elegant way to get subdirectories only?
SmbConfig config = SmbConfig.builder().withMultiProtocolNegotiate(true).build();
smbClient = new SMBClient(config);
Connection connection = smbClient.connect(smbServerName);
AuthenticationContext ac = new AuthenticationContext(smbUser, smbPassword.toCharArray(), smbDomain);
Session session = connection.authenticate(ac);
share = (DiskShare) session.connectShare(smbShareName);
List<FileIdBothDirectoryInformation> subs = share.list("mydirWhichSubDirsIwant");