Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import java.io.File; public class Main { private static final String DIRECTORY_TLOGS = "tlogs"; /** * Return the directory where the generated tlogs logging files are stored. * @return File to the tlogs directory */ private static File getTLogsDirectory(Context context) { File tlogDir = new File(context.getExternalFilesDir(null), DIRECTORY_TLOGS); if (!tlogDir.isDirectory()) { tlogDir.mkdirs(); } return tlogDir; } }