Code example for StatFs

Methods: getAvailableBlocks, getBlockSize

0
	{ 
		if (AndroidVersionCheckUtils.hasGingerbread()) 
		{ 
			return path.getUsableSpace();
		} 
		final StatFs stats = new StatFs(path.getPath());
		return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks();
	} 
 
	/** 
	 * 获得外部应用程序缓存目录 
	 *  
	 * @param context 
	 *            上下文信息 
	 * @return 外部缓存目录 
	 */ 
	public static File getExternalCacheDir(Context context)
	{ 
		if (AndroidVersionCheckUtils.hasFroyo()) 
		{ 
			return context.getExternalCacheDir();