在OSGI软件包中查找文件和文件夹 [英] Finding files and folders in an OSGI Bundle
问题描述
/ bundle
testdata
one.txt
two.txt
three.txt
folder1
file1.txt
file2.txt
在上面的包中想要查找testdata文件夹中存在的所有文件和文件夹。
最佳版本,
Keshav
如果您知道信息是什么包,请使用Bundle.findEntries或Bundle.getEntryPaths。
I am writing test cases that have to be executed in osgi environment, i have put the test data which is a set of files in the test bundle. I am able to access the test data files using bundle.getResource which returns an URL from which i can get the InputStream for a particular file, but how can i find out all the list of files in a particular folder in the test plugin. In eclispe i could use fileLocator to do this.
/bundle
testdata
one.txt
two.txt
three.txt
folder1
file1.txt
file2.txt
In the above bundle i want to find all the files and folders that are present in the testdata folder.
Best Reards,
Keshav
If you know what bundle the information is in, use Bundle.findEntries or Bundle.getEntryPaths.
这篇关于在OSGI软件包中查找文件和文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!