// 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;
package com.navercorp.utilsettest.storage;



public class DiskUtilsTestAcitivity extends FragmentActivity {
	private TextView textViewDiskUtils;
	private Context context;
	AsyncTask<Void, Void, String> diskUtilsTask;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_diskutils);
		
		textViewDiskUtils = (TextView) findViewById(R.id.textViewDiskUtils);
		context = this;
	}
	
	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		
		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);
			}
		};
		
// 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;

package com.navercorp.utilsettest.storage;



public class DiskUtilsTestAcitivity extends FragmentActivity {
	private TextView textViewDiskUtils;
	private Context context;
	AsyncTask<Void, Void, String> diskUtilsTask;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_diskutils);
		
		textViewDiskUtils = (TextView) findViewById(R.id.textViewDiskUtils);
		context = this;
	}
	
	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		
		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();