// Path: UtilSet/src/com/navercorp/utilset/storage/DiskUtils.java
// public final class DiskUtils {
// 	private static final String DATA_FOLDER = "/Android/data";
// 	protected static final String TEMPORARY_FOLDER = "/temp";
// 	protected static final String CACHE_FOLDER = "/cache";
// 
// 	/**
// 	 * Checks if External storage is mounted
// 	 * @return true if mounted; false otherwise
// 	 */
// 	public static boolean isExternalStorageMounted() {
// 		return Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
// 	}
// 
// 	/**
// 	 * Returns directory name to save cache data in the external storage<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing cache directory name
// 	 */
// 	public static String getExternalDirPath(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName() + CACHE_FOLDER;
// 	}
// 
// 	/**
// 	 * Returns directory name to save temporary files in the external storage for temporary<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing temporary directory name
// 	 */
// 	public static String getExternalTemporaryDirPath(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName() + TEMPORARY_FOLDER;
// 	}
// 
// 
// 	/**
// 	 * Returns root directory of the external storage.<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing external root directory name
// 	 */
// 	public static String getExternalContextRootDir(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName();
// 	}
// }


import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.TextView;
import com.navercorp.utilset.storage.DiskUtils;
import com.navercorp.utilsettest.R;
		
		diskUtilsTask = new AsyncTask<Void, Void, String>() {
			@Override
			protected String doInBackground(Void... params) {
				// TODO Auto-generated method stub
				return diskUtils();
			}

			@Override
			protected void onPostExecute(String result) {
				// TODO Auto-generated method stub
				textViewDiskUtils.setText(result);
			}
		};
		
		diskUtilsTask.execute();
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		
		diskUtilsTask.cancel(true);
		
		diskUtilsTask = null;
	}

	private String diskUtils() {
		String result = "*************** DiskUtils ***************\n";
// Path: UtilSet/src/com/navercorp/utilset/storage/DiskUtils.java
// public final class DiskUtils {
// 	private static final String DATA_FOLDER = "/Android/data";
// 	protected static final String TEMPORARY_FOLDER = "/temp";
// 	protected static final String CACHE_FOLDER = "/cache";
// 
// 	/**
// 	 * Checks if External storage is mounted
// 	 * @return true if mounted; false otherwise
// 	 */
// 	public static boolean isExternalStorageMounted() {
// 		return Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
// 	}
// 
// 	/**
// 	 * Returns directory name to save cache data in the external storage<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing cache directory name
// 	 */
// 	public static String getExternalDirPath(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName() + CACHE_FOLDER;
// 	}
// 
// 	/**
// 	 * Returns directory name to save temporary files in the external storage for temporary<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing temporary directory name
// 	 */
// 	public static String getExternalTemporaryDirPath(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName() + TEMPORARY_FOLDER;
// 	}
// 
// 
// 	/**
// 	 * Returns root directory of the external storage.<p>
// 	 * 
// 	 * This method always returns path of external storage even if it does not exist.<br>
// 	 * As such, make sure to call isExternalStorageMounted method as state-testing method and then call this function only if state-testing method returns true.
// 	 * 
// 	 * @param context Context to get external storage information
// 	 * @return String containing external root directory name
// 	 */
// 	public static String getExternalContextRootDir(Context context) {
// 		return Environment.getExternalStorageDirectory().getAbsolutePath() + DATA_FOLDER + File.separator + context.getPackageName();
// 	}
// }


// Path: UtilSetSampleApp/src/com/navercorp/utilsettest/storage/DiskUtilsTestAcitivity.java
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.TextView;
import com.navercorp.utilset.storage.DiskUtils;
import com.navercorp.utilsettest.R;

		
		diskUtilsTask = new AsyncTask<Void, Void, String>() {
			@Override
			protected String doInBackground(Void... params) {
				// TODO Auto-generated method stub
				return diskUtils();
			}

			@Override
			protected void onPostExecute(String result) {
				// TODO Auto-generated method stub
				textViewDiskUtils.setText(result);
			}
		};
		
		diskUtilsTask.execute();
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		
		diskUtilsTask.cancel(true);
		
		diskUtilsTask = null;
	}

	private String diskUtils() {
		String result = "*************** DiskUtils ***************\n";
		result += "isExternalStorageMounted : " + DiskUtils.isExternalStorageMounted() + "\n";