public static boolean exists(@NonNull String name, @NonNull File directory) {
        if (name == null) { throw new IllegalArgumentException("name cannot be null."); }
        if (directory == null) { throw new IllegalArgumentException("directory cannot be null."); }
        return getDatabasePath(directory, name).exists();
    }
public static boolean exists ( @ NonNull String name , @ NonNull File directory ) { if ( name == null ) { throw new IllegalArgumentException ( "name cannot be null." ) ; } if ( directory == null ) { throw new IllegalArgumentException ( "directory cannot be null." ) ; } return getDatabasePath ( directory , name ) . exists ( ) ; }
Checks whether a database of the given name exists in the given directory or not.

@param name      the database's name
@param directory the path where the database is located.
@return true if exists, false otherwise.