从黑莓设备获取所有图像名称
有没有办法迭代黑莓设备中存储的所有图像。我看过这个示例它迭代整个文件系统并扫描每个文件。我想知道是否有更便宜的方法可以做到同样的事情。直接查看图像目录的东西? 谢谢
Is there any way to iterate through all images stored in a blackberry device. I have seen this example which iterates over the whole file system and scans each file. I am wondering is there any cheaper way of doing the same. Something that directly looks into the image directory?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
System.getProperty(String key)
可以获取设备上的图像存储目录:Key“fileconn.dir.memorycard.photos”。返回 SD 卡上存储照片的默认目录。它应该类似于“file:///SDCard/BlackBerry/pictures/”。
键“fileconn.dir.photos”。返回设备内存上存储图片的默认目录。它应该类似于“file:///store/home/user/pictures/”。
知道这些位置后,您可以迭代其中的图像,而不是扫描整个文件系统。可以使用 FileConnection 列出图像 API。具体看一下
list(String filter, boolean includeHidden)
方法。Using
System.getProperty(String key)
it is possible to get image storage dirs on device:Key "fileconn.dir.memorycard.photos". Returns default directory for storing photos on SD Card. It should be something like "file:///SDCard/BlackBerry/pictures/".
Key "fileconn.dir.photos". Returns default directory for storing pictures on device memory. It should be something like "file:///store/home/user/pictures/".
Knowing these locations you can just iterage images inside of them, rather than scanning the whole file system. It is possible to list images using the FileConnection API. Specifically take a look at
list(String filter, boolean includeHidden)
method.