List of usage examples for android.os StatFs getBlockSize
@Deprecated public int getBlockSize()
From source file:com.fivehundredpxdemo.android.storage.ImageCache.java
/** * Check how much usable space is available at a given path. * * @param path The path to check// w w w . j a v a 2s .c o m * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.example.image.ImageCache.java
/** * Check how much usable space is available at a given path. * * @param path The path to check// w ww . ja v a 2s . c o m * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (VersionUtils.hasGingerbread()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.haipeng.libraryforandroid.cacheormemory.imageload.ImageCache.java
/** * Check how much usable space is available at a given path. * * @param path The path to check/*from ww w .j a v a2s . c o m*/ * @return The space available in bytes */ @SuppressWarnings("deprecation") @TargetApi(9) public static long getUsableSpace(File path) { if (SDKVersionUtil.hasGingerbread()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.xiaodong.dream.catcher.demo.image.ImageCache.java
/** * Check how much usable space is available at a given path. * * @param path The path to check/*from www . j a v a2 s. co m*/ * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (ImageUtils.hasGingerbread()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:android.support.asy.image.ImageCache.java
/** * Check how much usable space is available at a given path. * // w w w .jav a2s.c om * @param path * The path to check * @return The space available in bytes */ public static long getUsableSpace(File path) { // if (Utils.hasGingerbread()) { // return path.getUsableSpace(); // } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.wowcow.chat10.imagecache.ImageCache.java
/** * Check how much usable space is available at a given path. * // w w w . ja v a 2 s . c o m * @param path * The path to check * @return The space available in bytes */ @SuppressWarnings("deprecation") @TargetApi(9) public static long getUsableSpace(File path) { if (VersionUtil.hasGingerbread()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.andreaszeiser.bob.ImageCache.java
/** * Check how much usable space is available at a given path. * //from www .ja v a2 s .com * @param path * The path to check * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (UIUtils.hasGingerbread()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.tack.android.image.ImageCache.java
/** * Check how much usable space is available at a given path. * * @param path The path to check//from w ww. ja v a2s. c om * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (ConfigUtil.hasV09()) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.fireplace.market.fads.util.ImageCache.java
/** * Check how much usable space is available at a given path. * //from w w w . j a v a2 s.co m * @param path * The path to check * @return The space available in bytes */ @TargetApi(9) public static long getUsableSpace(File path) { if (Fireplace.IS_GINGERBREAD) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }
From source file:com.test.displaybitmaps.imagemanager.ImageCache.java
/** * Check how much usable space is available at a given path. * /*w w w . j a v a2 s. c om*/ * @param path * The path to check * @return The space available in bytes */ @TargetApi(VERSION_CODES.GINGERBREAD) public static long getUsableSpace(File path) { if (Build.VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) { return path.getUsableSpace(); } final StatFs stats = new StatFs(path.getPath()); return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks(); }