Karteek N wrote:
> Hi ,
> I want to display what are the files and contents in sdcard through
> application.
> I am able to print the root folder.But when i execute cd sdcard
> it throws me exception that permission is denied.
> When i did the same thing using adb shell i am able to display the sdcard.

Why don't you use Java file I/O?

Forking processes to read the output of things like ls is wasteful of
CPU, wasteful of memory, wasteful of battery life, and slow, when you
have alternatives.

http://exampledepot.com/egs/java.io/GetFiles.html
http://exampledepot.com/egs/java.io/TraverseTree.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.0
Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to