In my app am creating some files and storing them in cache dir. now from app only I want to access this files so i get them in a ListView by giving the path getExternalCacheDir().getAbsolutePath(). Here, I get a ListView with the whole path of the files. Instead I just want the file name to be displayed in list.
Can someone help?
In my app am creating some files and storing them in cache dir .
Share
Simply call
list()in the diretory to return an array of the file names in that directory:Alternatively, you can call
listFiles()to get back aFile[]if that if more useful to you.HTH