i want to download a directory but i have a problem.
public static void FileDownload(String targetdir, String savedir, FileTransferClient ftp) throws FTPException, IOException {
String[] save = getDir(targetdir, "/");
String folderOrFile;
for (int i = 0; i < save.length; i++) {
folderOrFile = save[i];
if (folderOrFile.equals(save[save.length - 1])) {
ftp.downloadFile(savedir, folderOrFile);
} else {
ftp.changeDirectory(folderOrFile);
}
}
}
it works if targetdir is "/conf/svnserve.conf" but i want to download server a directory for example "/conf/"