Complete ThemeUtils#isThemeExist

pull/137/head
ruibaby 2019-03-21 14:15:04 +08:00
parent f0da4c8cfb
commit f62db0100e
1 changed files with 16 additions and 0 deletions

View File

@ -184,6 +184,22 @@ public class ThemeUtils {
return result; return result;
} }
/**
* Judging whether theme exists under template path
*
* @param theme theme name
* @return boolean
* @throws FileNotFoundException FileNotFoundException
*/
public static boolean isThemeExist(String theme) throws FileNotFoundException {
boolean result = false;
File file = new File(getThemesPath(theme), theme);
if (file.exists()) {
result = true;
}
return result;
}
/** /**
* Judging whether the theme is a internal theme or not * Judging whether the theme is a internal theme or not
* *