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 09:54 Go to next message
Asim Mising name is currently offline Asim Mising nameFriend
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 18:59 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2341
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: Fri Dec 19 08:09:54 GMT 2014

Powered by FUDForum. Page generated in 0.12887 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software