几种方法如下:非Web程序 1.AppDomain.CurrentDomain.BaseDirectory 2.Environment.CurrentDirectory 3.HttpRuntime.BinDirectory The path to the current application's/bin directory. Web程序 HttpCurrent.Context.Server.Mappath(); -----------------------------------------
本文介绍Android开发中如何获取SDCard中某目录下的所有图片并显示出来,下面的我们提供的这个函数是通用的,只要提供路径就可以查询出该目录下所有图片的路径信息,并保存到一个List<String>中. 1.获取SDCard中某个目录下图片路径集合 public List<String> getPictures(final String strPath) { List<String> list = new ArrayList<String>(); Fil