package com.angcyo.uiview;

import android.os.Environment;

import java.io.File;
import java.util.UUID;

/**
 * Created by angcyo on 2016-11-05.
 */

public class Root {
    public static String APP_FOLDER = "DValley";

    public static String getAppExternalFolder() {
        return getAppExternalFolder("");
    }

    public static String getAppExternalFolder(String folder) {
        if (folder == null) {
            folder = "";
        }
        return Environment.getExternalStorageDirectory().getAbsoluteFile() +
                File.separator + Root.APP_FOLDER + File.separator + folder;
    }

    /**
     * 创建时间文件名
     */
    public static String createTimeFileName() {
        String dataTime = RCrashHandler.getDataTime("yyyy-MM-dd_HH-mm-ss-SSS");
        return dataTime;
    }

    /**
     * 创建随机文本名
     *
     * @param suffix 后缀
     */
    public static String createFileName(String suffix) {
        if (suffix == null) {
            suffix = "";
        }
        return UUID.randomUUID().toString() + suffix;
    }

    public static String createFileName() {

        return createFileName("");
    }
}

@@ -435,32 +435,33 @@
 ;%0A        %7D%0A
+%0A
         
 return Envir
@@ -448,23 +448,37 @@
         
-return 
+File file = new File(
 Environm
@@ -605,16 +605,123 @@
 + folder
+);%0A        if (!file.exists()) %7B%0A            file.mkdirs();%0A        %7D%0A        return file.getAbsolutePath()
 ;%0A    %7D%0A

fix path create