Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
Why did you conclude that it can't be done?
Previous Topic:How To Write an Autocomplete File for Eclipse?
Next Topic:Runtime update of Reports throuht python API
Goto Forum:
  


Current Time: Thu Jul 03 04:19:19 EDT 2025

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

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

Back to the top