×
Namespaces

Variants
Actions

Talk:How to list files and folders in Java ME

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}
29 Sep
2009
Article Review by Larry101 (20090929)

This article demonstrates basic use of the PIM (JSR-75) API. It shows how we can list the files and folders available in a certain file system root using this API. This is a fairly basic article, and mainly consists of a code example, showing how to retrieve a list of all the files and folders in the c:/ file system root (usually the phone's built-in memory). The code example shows how to use a FileConnection object and its "list" method to retrieve an enumeration containing all the files and folders at a particular file path. The code also shows how to navigate through this enumeration, how to distinguish between files and folders, and how to find out file and folder size.

The article is very simple, but the code example does a good job of demonstrating several fundamental concepts that that File Connection API is commonly used for. This article is therefore useful reading for those who are new to the API, or who just want to find out how to get a list of files and folders using the API.


 
×