/*    */ package com.seuic.scanner;
/*    */ 
/*    */ import android.os.Environment;
/*    */ import android.util.Log;
/*    */ import java.io.File;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class FileUtil
/*    */ {
/*    */   private static final String LOG_TAG = "FileUtil";
/* 14 */   public static final String APP_TEMP_DIRECTORY = Environment.getExternalStorageDirectory() + "/PDATest";
/*    */   
/*    */   public static boolean fileExists(String file) {
/* 17 */     File _file = new File(file);
/* 18 */     return _file.exists();
/*    */   }
/*    */   
/*    */   public static boolean createDirectory(String directory) {
/*    */     try {
/* 23 */       File file = new File(directory);
/* 24 */       if (!file.exists() && !file.isDirectory()) {
/* 25 */         file.mkdir();
/*    */       }
/* 27 */       return true;
/* 28 */     } catch (Exception ex) {
/* 29 */       return false;
/*    */     } 
/*    */   }
/*    */   
/*    */   public static void createFile(String filename) {
/* 34 */     File file = new File(filename);
/*    */     try {
/* 36 */       file.createNewFile();
/* 37 */     } catch (IOException e) {
/* 38 */       Log.e("FileUtil", "createFile : " + e.getMessage());
/*    */     } 
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static void clear(String folder) {
/* 48 */     File filefolder = new File(folder);
/* 49 */     if (filefolder != null) {
/* 50 */       if (filefolder.isDirectory()) {
/* 51 */         File[] filelist = filefolder.listFiles(); byte b; int i; File[] arrayOfFile1;
/* 52 */         for (i = (arrayOfFile1 = filelist).length, b = 0; b < i; ) { File file = arrayOfFile1[b];
/* 53 */           clear(file.getPath()); b++; }
/*    */       
/*    */       } 
/* 56 */       filefolder.delete();
/*    */     } 
/*    */   }
/*    */   
/*    */   public static void delete(String filename) {
/* 61 */     File file = new File(filename);
/* 62 */     if (file.exists())
/* 63 */       file.delete(); 
/*    */   }
/*    */ }


/* Location:              E:\Demo\ChaoRan_A9L\libs\ScannerAPI.jar!\com\seuic\scanner\FileUtil.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */