Hi,
I am developping a J2ME application who needs to list the local files in a directory. In order to do that I use:
private static final String directory="file:///Memory card/Images/";
and later:
cg=new ChoiceGroup("Choose a File to Send:",Choice.POPUP);
FileConnection root=(FileConnection) Connector.open(directory, Connector.READ);
Enumeration files=root.list();
root.close();
while(files.hasMoreElements()) {
cg.append(files.nextElement().toString(), null);
}
It works properly on the emulator but in the N95 it blocks in the "while loop".
Any ideas?
Thank you very much for your help.
Roberto Guerra

Reply With Quote

