Android examples for File Input Output:File System
get Free Space using File class by path string
//package com.java2s; import java.io.File; public class Main { public static long getFreeSpace(String path) { File file = new File(path); if (!(file.isDirectory() && file.exists())) { file.mkdirs();/* w ww . j av a 2 s .c om*/ if (file.isDirectory()) { return file.getFreeSpace(); } else { return 0L; } } else { return file.getFreeSpace(); } } }