public DataOperate(Context con) { this.con = con; this.path = Utils.getSDPath() + "/joysee/images/"; File file = new File(path); if (!file.exists()) { file.mkdirs(); } mNetUtil = new NetUtil(con); }
public DataOperate(Context con, Handler handler) { this.con = con; this.handler = handler; // this.path=con.getFilesDir().getPath()+"/images/"; this.path = Utils.getSDPath() + "/joysee/images/"; File file = new File(path); if (!file.exists()) { file.mkdirs(); } mNetUtil = new NetUtil(con); }
/** 每次设置路径时,判断sd card在不在,不在就重新设置 */ public void setPath() { boolean sdCardExist = Utils.checkSDcard(); if (!sdCardExist) { AppLog.d(TAG, "sd card is not exist!!!!!!!!!"); path = Constants.IMAGEROOT; File file = new File(path); if (!file.exists()) { file.mkdirs(); } } else { AppLog.d(TAG, "sd card is exist"); } }