如何动态访问文件夹内容 [英] How to access folder contents dynamically
本文介绍了如何动态访问文件夹内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我想动态获取文件夹中的所有图像.就像我必须通过将Mysql数据库中的文件夹路径存储在galleryimages/(此文件夹中的所有图像)之类的Mysql数据库中来显示celebriti的画廊,而不是将所有图像路径存储在db中一样.有什么办法可以直接从文件夹访问所有图像,而不是从db获取路径?
如果可以的话,如何才能动态地从floder访问这些图像.
请帮助我.
Hi
i want get the all images from folder dynamically. Like i have to display gallery of a celebriti in my webpage by storing the folder path in Mysql database like galleryimages/(all images inside this folder) instead of storing all image paths in db. is there any way that i can access all images directly from folder instead of getting the path from db
is it possible if so how can i access these images from floder dynamically.
please help me.
推荐答案
文档内容如何( [ ^ ])?
What about the documentation ( "Filtering a Directory Listing By Using Globbing"[^])?
有很多链接向您展示了如何获取Java中文件夹的内容:
http://stackoverflow.com/Questions/7301764/how-to-get-contents-of-a-folder-and-put-into-arrary-list [ ^ ]
http://stackoverflow.com/questions/1844688/read-all-files-in-文件夹 [ ^ ]
http://www.javaprogrammingforums. com/java-programming-tutorials/3-java-program-can-list-all-files-given-directory.html [
There are many links show you how to get the content of a folder in Java:
http://stackoverflow.com/questions/7301764/how-to-get-contents-of-a-folder-and-put-into-arrary-list[^]
http://stackoverflow.com/questions/1844688/read-all-files-in-a-folder[^]
http://www.javaprogrammingforums.com/java-programming-tutorials/3-java-program-can-list-all-files-given-directory.html[^]
这篇关于如何动态访问文件夹内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文