Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Simple java search

  • 14-04-2005 2:54pm
    #1
    Closed Accounts Posts: 43


    Can anyone tell me how to do a simple java search of a disk? Im trying to get it to look for some folders on the drive, like the desktop folder, but I dont want to hard code the path name in. I would like it to be able to look for the folder name itself. If anyone could help me out in this respect.


Comments

  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    Jakarta commons class suit you?
    org.apache.commons.io.find.FileFinder

    http://jakarta.apache.org/commons/io/apidocs/index.html


  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    Afterthought: guessing that you're building a user app, you might want to consider the possibility that the a user might have access to multiple user folders called called Desktop, so you might want to look at

    javax.swing.filechooser.FileSystemView
    getHomeDirectory() and getDefaultDirectory()

    which make use of the windows settings


Advertisement