mirror of https://github.com/halo-dev/halo
Complete ThemeUtils#isThemeExist
parent
f0da4c8cfb
commit
f62db0100e
|
@ -184,6 +184,22 @@ public class ThemeUtils {
|
|||
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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue