if (c != null) {
Boolean containsWildcardCharacter = false;
Boolean isDirectory = false;
try {
SftpATTRS ss = c.lstat(path);
isDirectory = ss.isDir();
} catch (SftpException e) {
containsWildcardCharacter = true;
}
Vector<LsEntry> files = (Vector<LsEntry>) c.ls(path);
for (LsEntry lsEntry : files) {
SftpATTRS sftpAttrs = lsEntry.getAttrs();
if (sftpAttrs == null) {
throw new IllegalArgumentException(
"paramkey dir not found on the remote server: "
+ lsEntry.getFilename());
} else if (sftpAttrs.isDir()) {
LOGGER.info(lsEntry.getFilename()
+ " is a directory, permission string is "
+ sftpAttrs.getPermissionsString());
} else {
LOGGER.info(lsEntry.getFilename()
+ " is a file, permission string is "
+ sftpAttrs.getPermissionsString());
}
if (lsEntry.getFilename().startsWith(".")
|| lsEntry.getFilename()
.startsWith("_")