Android SD Card File System

In short - how to check which file system is used on the SD card?

I would like to be able to distinguish between FAT and NTFS.

+4
source share
1 answer

One way is to parse the output of the mount command

Edit: here is the code

proc = Runtime.getRuntime().exec("mount"); BufferedReader in = new BufferedReader(new InputStreamReader(proc .getInputStream())); String line = null; while ((line = in.readLine()) != null) { //parse here } 

you need to parse the string line to check the file system for the SD card. I think it should work for non-root devices.

+5
source

All Articles