Re: how to get list of files and directories in specific folder with android ndk

596 views
Skip to first unread message
Message has been deleted

Tor Lillqvist

unread,
Aug 8, 2012, 3:18:05 AM8/8/12
to andro...@googlegroups.com
What is "getdir"? Never heard of such a Unix function. You know about opendir() and closedir(), and presumably readdir() already, that's all you need.

Well, you will have to know *what* directory you want to opendir(), we can't know that, and you didn't ask for that information anyway;) And please note that your app will not be able to read the directories of other apps, for instance, they are protected that way. Using NDK doesn't change that. So actually, much simpler to just do what you want to do in Java, as the API to find out the path to your app's own directory (if that is what you want to open) is easier to use from Java anyway. Don't be afraid of Java, and don't think "native" code has any more "privileges" than Java code.

--tml

Reply all
Reply to author
Forward
0 new messages