You Are Here:

Community: Developer Discussion Boards

#1 Old Parse into the folders - 2006-04-19, 11:42

Join Date: Oct 2005
Posts: 54
divyas
Offline
Regular Contributor
hi ,

I am trying to make a list where the items in the list would come fron the filenames which lie inside a given folder.So for that i will have to indentify the number of files in the given folde and the names of these files.
All this has to be done dynamically .........

Please help me by telling how can i parse the folder to determine the number of files inside it and their name.
Is their any function or some Api which can be used.
Reply With Quote

#2 Old Re: Parse into the folders - 2006-04-19, 18:24

Join Date: Mar 2006
Posts: 556
Location: Phoenix, AZ. USA
Jason Glass's Avatar
Jason Glass
Offline
Super Contributor
Code:
To list the content of a directory that your FileConnection is pointing to:
Enumeration e = fc.list();
while (e.hasMoreElements()) {
 System.out.println(((String)e.nextElement()));
}
This method returns an enumeration of all directories and files that are present in the directory. Directories are denoted with a trailing slash "/" in their returned name.

then while inside of while loop, create a fileconnection to each element, once created, get its name, and pertinent info


Jason Glass
http://IChiBanComputers.Com
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Folders in listbox jrantam Symbian User Interface 2 2008-10-10 12:44
how to parse the xml? anyone use the SyExpat? ipis General Symbian C++ 11 2007-02-28 05:16
probelm with hiding folders in messaging system chishti.hameed Symbian Networking & Messaging 0 2006-03-02 14:40
Get the folders and the messages in "Documents" bernie31 Symbian Networking & Messaging 0 2006-01-19 19:07
Accesing Nokia Pc Suite Folders URGENT tarunnasa PC Suite API and PC Connectivity SDK 1 2004-08-21 04:01

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia