Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » accessing files - OSGI(accessing files from a local directory within OSGI)
accessing files - OSGI [message #1112246] Thu, 19 September 2013 05:54 Go to next message
Asim Mising name is currently offline Asim Mising name
Messages: 8
Registered: August 2011
Junior Member
HI,

I need to know how to list the names of the files contained within a directory. The directory resides within an osgi bundle running on Karaf.

normally, we use the following code to access the list of files but this can't be done when using OSGI

thanks,

 File directory = new File("dir");
		 
	        //get all the files from a directory
	        File[] fList = directory.listFiles();
	 
	        for (File file : fList){
	            if (file.isFile()){
	                System.out.println(file.getName());
	            }
	        }

	}
Re: accessing files - OSGI [message #1112466 is a reply to message #1112246] Thu, 19 September 2013 14:59 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2237
Registered: July 2009
Senior Member
Why did you conclude that it can't be done?

---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:How To Write an Autocomplete File for Eclipse?
Next Topic:Runtime update of Reports throuht python API
Goto Forum:
  


Current Time: Wed Jul 30 07:27:27 EDT 2014

Powered by FUDForum. Page generated in 0.02757 seconds