java - Trying to get a file path to a public folder on android device and get its content -


i looking file path of folder , content. folders public folder can access connecting device computer. how go getting file path access these public folders , content?

so once connect computer device these folders see , there 1 says "folder items from" , can't seem figure file path in order access content enter image description here.

this how i'm trying content , log them

    file fileofepubs = new file("/data/data/folder of items from/");       file[] direpub = fileofepubs.listfiles();      if (direpub.length != 0){         (int = 0; < direpub.length; i++){             string filename = direpub[i].tostring();             log.i("file", "file name = " + filename);         }     } 

you appear looking @ root of external storage. programmatically, access via environment.getexternalstoragedirectory(). requires either read_external_storage or write_external_storage permission.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -