Google에서 "how get size sdcard"로 얻은 결과에 많은 게시물들이 있더군요.
StatFs는 FileSystem 공간에 관한 정보를 갖고 있다고 하네요. 이를 응용하면 img폴더로 접근하여 하위 디렉토리에 관한 용량 체크하는 것또한 어렵지는 않겠네요.
StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath());
long bytesAvailable = (long)stat.getBlockSize() * (long)stat.getBlockCount();
long megAvailable = bytesAvailable / 1048576;
the cast to long is necessary for cards larger than 4Gig.
Google에서 "how get size sdcard"로 얻은 결과에 많은 게시물들이 있더군요.
StatFs는 FileSystem 공간에 관한 정보를 갖고 있다고 하네요. 이를 응용하면 img폴더로 접근하여 하위 디렉토리에 관한 용량 체크하는 것또한 어렵지는 않겠네요.
출처 http://www.mail-archive.com/android-developers@googlegroups.com/msg85831.html