|BayesFilterSaveDatabase Method (String, String)|
public void SaveDatabase( string spamFilename, string nonSpamFilename )
Public Sub SaveDatabase ( spamFilename As String, nonSpamFilename As String )
|MailBeeInvalidArgumentException||spamFilename or nonSpamFilename is an empty string or a null reference (Nothing in Visual Basic).|
|MailBeeIOException||An I/O error occurred.|
This method always saves the database from memory to disk even if it has not been changed since it had been loaded with LoadDatabase(String, String) method. If you want to save the database only if it had been changed, use another SaveDatabase(String, String, Int32, Boolean) overload.
If you do not have a database yet, you should not call LoadDatabase(String, String). In this case, it's assumed the default empty database is loaded. You can then train it with TrainFilter(MailMessage, Boolean) method and then save the produced database to disk.
Make sure your application has read/write access to the specified database file locations.