The following code list/check all the folders that existed in SD card, which is inserted in J2ME or Blackberry running OS. Please remember to import necessarily packages (in eclipse based, us Ctrl + Shift + O)
String root = null;
Enumeration e = FileSystemRegistry.listRoots();
while (e.hasMoreElements()) {
root = (String) e.nextElement(); // device has a microSD
if (root.equalsIgnoreCase("store")) {
System.out.println("okies man - store/ is available");
} else {
System.out.println(root);
}
}
ReplyDeleteYour website is very good.This is a very good article.
Thank you for providing this information...
I really gained knowledge that benefited all.
Visit Us