提交 b05171d7 编写于 作者: B Blankj

see 04/08 log

上级 72af9ebf
* `20/04/08` [fix] CleanUtils clean dir not work. Publish v1.27.4.
* `20/04/08` [fix] CleanUtils clean dir not work. FileUtils#isFileExists. Publish v1.27.4.
* `20/04/08` [fix] CrashUtils DefaultUncaughtExceptionHandler is wrong; LogUtils write file failed; Utils#getApp failed run on remote process. Publish v1.27.3.
* `20/04/07` [mdf] GsonUtils#getGson() method public.
* `20/04/04` [fix] ShadowUtils bug running on lower version devices. Publish v1.27.2.
......
......@@ -50,6 +50,16 @@ public final class FileUtils {
return UtilsBridge.isSpace(filePath) ? null : new File(filePath);
}
/**
* Return whether the file exists.
*
* @param file The file.
* @return {@code true}: yes<br>{@code false}: no
*/
public static boolean isFileExists(final File file) {
return file != null && isFileExists(file.getAbsolutePath());
}
/**
* Return whether the file exists.
*
......@@ -58,7 +68,8 @@ public final class FileUtils {
*/
public static boolean isFileExists(final String filePath) {
if (Build.VERSION.SDK_INT < 29) {
return isFileExists(getFileByPath(filePath));
File file = getFileByPath(filePath);
return file != null && file.exists();
}
return isFileExists29(filePath);
}
......@@ -79,16 +90,6 @@ public final class FileUtils {
return true;
}
/**
* Return whether the file exists.
*
* @param file The file.
* @return {@code true}: yes<br>{@code false}: no
*/
public static boolean isFileExists(final File file) {
return file != null && file.exists();
}
/**
* Rename the file.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册