package com.epson.cameracopy.alt;

import android.content.Context;
import android.os.Environment;

import androidx.annotation.NonNull;

import java.io.File;

import epson.common.ExternalFileUtils;

public class FileUtils {
    public static final String TEMPRARY_DIRECOTRY = "tempCamera";

    public static boolean checkExternalStorage() {
        return "mounted".equals(Environment.getExternalStorageState());
    }

    public static File getNewTemporaryJpegFile(@NonNull Context context) {
        File file = new File(getCameracopyTempDir(context).getPath(), "temp.jpg");
        if (file.exists()) {
            file.delete();
        }
        return file;
    }

    @NonNull
    public static File getCameracopyTempDir(@NonNull Context context) {
        File file = new File(context.getExternalCacheDir(), TEMPRARY_DIRECOTRY);
        ExternalFileUtils.getInstance(context).createTempFolder(file.getPath());
        return file;
    }


    public static void copy(java.io.File r9, java.io.File r10) throws java.io.IOException {

        throw new UnsupportedOperationException("Method not decompiled: com.epson.cameracopy.alt.FileUtils.copy(java.io.File, java.io.File):void");
    }
}
