Newer
Older
dxcgt / app / src / main / java / com / smartdot / cgt / util / FileUtils.java
wangxitong on 6 Apr 2021 426 bytes first commit
package com.smartdot.cgt.util;

import java.io.File;

public class FileUtils
{
	/**
	 * 判断指定路径的文件或文件夹是否存在
	 */
	public static boolean isFileExists(String path)
	{
		File file = new File(path);
		return file.exists();
	}

	/**
	 * 删除指定路径的文件
	 */
	public static void deleteFile(String path)
	{
		File file = new File(path);
		if (file.exists())
		{
			file.delete();
		}
	}

}