Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in Java FTP by (140 points)
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/"

1 Answer

0 votes
by (162k points)
edtFTPj doesn't have an API for downloading a directory - you would have to implement it yourself.

See edtFTPj/PRO for a product with a directory transfer API.

Categories

...