Android Lab Test : Reading the foot file list (english)
Video of tutorial on : https://www.youtube.com/playlist?list=PLL2Z3bzdO25yHwIV3XdMzKs61At0Ldh6L
Visit http://www.AndroidLabTest.com
Android Lab Test : Reading the foot file list (english)
1. Develop on Android
Android Lab Test
www.AndroidLabTest.com
Youku
By Bruno Delb
www.weibo.com/brunodelb
i.youku.com/brunodelb | www.weibo.com/brunodelb | blog.delb.cn
http://i.youku.com/brunoparis
Weibo
Officialsite
Lesson : The list of root directories
2. The list of the root directories
• In this lesson, you will learn to use the file manager to list
the list of root files.
• For this, you will use File and listFiles.
3. The list of the root directories
• In order to know the path to the application directory, use the
method getFilesDir().
File file = this.getFilesDir();
• In order to know the absolute path to a directory, use the method
getAbsolutePath() :
String text = "Local storage : " + file.getAbsolutePath();
4. The list of the root directories
• To get the list of directories and files at the root, use the
method listRoots().
File[] files = File.listRoots();
5. The list of the root directories
• To know if an entry of a directory is a directory, use the method
isDirectory() :
if (file.isDirectory()) {
}
• To get he list of the files and directories of a directory, use the
method listFiles() :
rootFile.listFiles()
9. Follow me on my channel PengYooTV …
On my Youku channel
http://i.youku.com/brunoparis
Who am I ?
Bruno Delb (www.delb.cn),
Author of the first french book of development of Java mobile application (2002),
Consultant, project manager and developer of social & mobile applications,
let’s talk about your needs ...
And on Weibo :
http://www.weibo.com/brunodelb