본문 바로가기 메뉴 바로가기

devbible

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

devbible

검색하기 폼
  • 전체보기 (356)
    • Tips (44)
    • News (32)
    • Event (10)
    • Travel (0)
    • Review (2)
    • Development (266)
    • etc (1)
  • 방명록

SD카드용량 (1)
[Android] 마운트된 드라이브의 전체/가용용량 구하기 , 바이트용량 구하기

마운트된 메모리(외부SD카드메모리포함)의 전체용량과 가용메모리를 구하는 함수이다.이와 더불어 용량이 얼마인지 표식(KB,MB,GB...)으로 볼 수 있는 함수를 추가하였다. * 전체사이즈 static public long getTotalMountSize(String mountPath){ File path = new File(mountPath); StatFs stat = new StatFs(path.getPath()); long blockSize = stat.getBlockSize(); long totalBlocks = stat.getBlockCount(); return totalBlocks * blockSize; } *가용사이즈 static public long getAvailableMountSize(S..

Development 2013. 10. 28. 15:02
이전 1 다음
이전 다음
최근에 올라온 글
글 보관함
Total
Today
Yesterday
TAG
  • MySQL
  • Collections
  • dotnet
  • WSL
  • 게임
  • svn
  • MSSQL
  • vcamp140.dll
  • Java
  • vcruntime140.dll
  • Spring
  • ubuntu
  • Visual Studio 2015
  • KitKat
  • 이벤트
  • vcomp140.dll
  • CentOS
  • android
  • SharedPreferences
  • Shell
  • VisualStudio
  • 게임쿠폰
  • redis
  • 티스토리 초대장
  • Linux
  • Eclipse
  • 쿠폰
  • JavaScript
  • ListView
  • dpi
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바