Code example for File

Methods: existsgetAbsoluteFilegetAbsolutePathmkdirs

0
		File f = new File(ctx.getCacheDir(), "ACache");
		return get(f, max_zise, max_count);
	} 
 
	public static ACache get(File cacheDir, long max_zise, int max_count) {
		ACache manager = mInstanceMap.get(cacheDir.getAbsoluteFile() + myPid());
		if (manager == null) {
			manager = new ACache(cacheDir, max_zise, max_count);
			mInstanceMap.put(cacheDir.getAbsolutePath() + myPid(), manager);
		} 
		return manager;
	} 
 
	private static String myPid() {
		return "_" + android.os.Process.myPid();
	} 
 
	private ACache(File cacheDir, long max_size, int max_count) {
		if (!cacheDir.exists() && !cacheDir.mkdirs()) {
			throw new RuntimeException("can't make dirs in "
					+ cacheDir.getAbsolutePath());
		} 
		mCache = new ACacheManager(cacheDir, max_size, max_count);
	} 
 
	// ======================================= 
	// ============ String数据 读写 ============== 
	// ======================================= 
Contextual code suggestions in your IDE  Get Codota for Java