For overall data about a filesystem, you can use this class: http://developer.android.com/reference/android/os/StatFs.html
Use the path you retrieve with Environment.getExternalStoragePath(). Warning: the APIs return number of blocks in integers. Be sure you cast this to a long before multiplying with the block size, to avoid overflow errors. Also note that starting with Android 3.0 the "SD card" may not actually be its own partition, in which case this would be telling you the total size and amount used of all internal storage. On Tue, Mar 1, 2011 at 3:37 AM, shobi <[email protected]> wrote: > Hi all, > In my application i want to display all the properties of the > sdcard like sizeof sdcard, used space in sdcard , free space etc.. > I'm > unable to get the used space of sdcard and free space in sdcard, and > also unable to get the total size > of sdcard ( size given at the creation time of AVD ). How can i do > that? > > Thanks in advance. > > -- > 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 > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

