문제

Long story short - how do I check what filesystem is used on the SD card?

I'd like to be able to differentiate between FAT and NTFS.

도움이 되었습니까?

해결책

One way is to parse output of 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 will have to parse string line to check the filesystem for sdcard. I think it should work for non rooted devices also

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top