06-18-2012 04:34 PM - edited 06-18-2012 04:37 PM
Purpose: Try to transfer files by socket method.
For general java code:
File file = new File(filedirectory);
String files = file.list();
// for verify, whether file.list is work or not. proof work.
int numFiles = files.length;
How to get file list's length?
Length =1 means one file.
Length =10 means 10 files in the directory.
FileConnection fc = (FileConnection)Connector.open(filePath);
files = fc.list();
int numFiles = files.length; (No this kind of coding method)
Thanks your attention.