-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFTPFileLister.java
More file actions
23 lines (20 loc) · 579 Bytes
/
FTPFileLister.java
File metadata and controls
23 lines (20 loc) · 579 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package util;
import java.io.File;
import java.io.IOException;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
public class FTPFileLister {
private Object[][] data;
private FTPFile[] fileList;
public Object[][] makeTableData(FTPClient ftpClient) throws IOException{
fileList=ftpClient.listFiles();
data=new Object[fileList.length][4];
for(int i=0;i<fileList.length;i++) {
data[i][0]=fileList[i];
data[i][1]=fileList[i];
data[i][2]=fileList[i];
data[i][3]=fileList[i];
}
return data;
}
}