if (fileInfo.get(j) instanceof MlsxEntry) {
name = ((MlsxEntry) fileInfo.get(j)).getFileName();
} else if (fileInfo.get(j) instanceof FileInfo) {
name = ((FileInfo) fileInfo.get(j)).getName();
} else {
throw new ToolsException("Unsupported type returned by gridftp " + fileInfo.get(j));
}
if (!name.equals(".") && !name.equals("..")) {
URI uri = GFacUtils.createGsiftpURI(contactInfo.hostName, dirURI.getPath() + File.separator + name);
files.add(uri.getPath());
}
}
}
return files;
} catch (IOException e) {
throw new ToolsException("Could not list directory: " + dirURI.toString() ,e);
} catch (ServerException e) {
throw new ToolsException("Could not list directory: " + dirURI.toString() ,e);
} catch (ClientException e) {
throw new ToolsException("Could not list directory: " + dirURI.toString() ,e);
} catch (URISyntaxException e) {
throw new ToolsException("Error creating URL of listed files: " + dirURI.toString() ,e);
} finally {
if (srcClient != null) {
try {
srcClient.close();
} catch (Exception e) {