×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    47

    How to search for images in the whole file system?

    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 19:07. Reason: to add the last line

  2. #2
    Nokia Developer Champion
    Join Date
    Sep 2007
    Posts
    915

    Re: How to search for images in the whole file system?

    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 19:18. Reason: Change in Syntaxt

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    47

    Re: How to search for images in the whole file system?

    How can i go to everydirectory?
    Could i use recursive programming or could it cause overheading?

  4. #4
    Nokia Developer Champion
    Join Date
    Sep 2007
    Posts
    915

    Re: How to search for images in the whole file system?

    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.

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    47

    Re: How to search for images in the whole file system?

    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

Similar Threads

  1. Regarding File system in symbian 3.0
    By Priya_m in forum Symbian
    Replies: 6
    Last Post: 2006-10-05, 15:05
  2. Replies: 1
    Last Post: 2005-05-26, 14:22
  3. Symbian file system
    By gargidasgupta in forum Symbian
    Replies: 0
    Last Post: 2004-09-20, 08:55
  4. Symbian File System
    By gargidasgupta in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-09-20, 08:52
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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