Code example for File

Methods: getParent

0
				.getDefaultSharedPreferences(this.context);
		String orgBasePath = "";
 
		if (getStorageMode().equals("sdcard")) {
			String indexFile = appSettings.getString("indexFilePath", "");
			File fIndexFile = new File(indexFile);
			orgBasePath = fIndexFile.getParent() + "/";
		} else { 
			orgBasePath = Environment.getExternalStorageDirectory()
					.getAbsolutePath() + "/mobileorg/";
		} 
 
		return orgBasePath;
	} 
	 
	// Used by encryption 
	public byte[] getRawFileData() { 
		try { 
			File file = getFile();
			FileInputStream is = new FileInputStream(file);
			byte[] buffer = new byte[(int) file.length()];