You Are Here:

Community: Developer Discussion Boards

#1 Old How to search for images in the whole file system? - 2008-03-27, 20:03

Join Date: Feb 2008
Posts: 46
giapage
Offline
Registered User
Hello,
i'm developing an aplication that needs to build a list of all images stored in the mobile-memory and memory card with the respective directory-path.
Is there a class to do it?
I've found:
http://wiki.forum.nokia.com/index.ph...ers_in_Java_ME

and

http://wiki.forum.nokia.com/index.ph...ery_in_Java_ME

but it doesn't solve my problem.
Thank you in advance for helping me.
Già

PS: I will need to do the same for videos
Last edited by giapage : 2008-03-27 at 20:07. Reason: to add the last line
Reply With Quote

#2 Old Re: How to search for images in the whole file system? - 2008-03-27, 20:15

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
Go in every directory one by one and then search images by following funciton.

list(*.png,true);


Syntax: Enumeration list(String filter, boolean includeHidden)throws IOException

Thus you will get the Enumeration object which contains png images list which is in the current
Last edited by honest_success : 2008-03-27 at 20:18. Reason: Change in Syntaxt
Reply With Quote

#3 Old Re: How to search for images in the whole file system? - 2008-03-27, 20:23

Join Date: Feb 2008
Posts: 46
giapage
Offline
Registered User
How can i go to everydirectory?
Could i use recursive programming or could it cause overheading?
Reply With Quote

#4 Old Re: How to search for images in the whole file system? - 2008-03-27, 21:52

Join Date: Sep 2007
Posts: 874
honest_success's Avatar
honest_success
Offline
Forum Nokia Champion
Enumeration roots = FileSystemRegistry.listRoots();
String currentRoot = null;
while (roots.hasMoreElements()) {
currentRoot = (String) roots.nextElement();

//code here


}
after geting root of file system try to find weather directory are available in it uisng isDirectory() method.Store direcotory name and then go inside directory one by one and check weather there is a image or directory.

It will depend upon your logic to create recursion or some thing else but i will suggest to make common function. I was thinking to write whole code here but it will better if you try first because it's logic. I gave you all the method name which you will have to use so now just apply logic.If found any problem during implement it then write here.
Reply With Quote

#5 Old Re: How to search for images in the whole file system? - 2008-03-28, 01:09

Join Date: Feb 2008
Posts: 46
giapage
Offline
Registered User
Thank you very much.
I'll try to implement my own solution and if it will not be working, i'll let you know.
Thanks for assistance!
Giacomo
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
Regarding File system in symbian 3.0 Priya_m General Symbian C++ 6 2006-10-05 16:05
What is the error in my code here? Unable to Save document to file yuva69 General Symbian C++ 1 2005-05-26 15:22
Symbian file system gargidasgupta General Symbian C++ 0 2004-09-20 09:55
Symbian File System gargidasgupta Symbian Networking & Messaging 0 2004-09-20 09:52
Looking for help from member......pl...help me in my source code. yuva69 General Symbian C++ 0 2002-06-10 13:24

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