Skip to content

Commit

Permalink
Mejoras IOUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
jencisopy committed Dec 26, 2024
1 parent a9f2ebc commit 639f43c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions commons/src/main/java/org/javabeanstack/io/IOUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ private IOUtil() {
* @return verdadero si existe, falso si no
*/
public static boolean isFileExist(String filePath) {
if (Strings.isNullorEmpty(filePath)){
return false;
}
File f = new File(filePath);
return f.exists() && !f.isDirectory();
}
Expand All @@ -59,6 +62,9 @@ public static boolean isFileExist(String filePath) {
* @return verdadero si existe, falso si no.
*/
public static boolean isFolderExist(String folder) {
if (Strings.isNullorEmpty(folder)){
return false;
}
File f = new File(folder);
return f.exists() && f.isDirectory();
}
Expand Down

0 comments on commit 639f43c

Please sign in to comment.