Exists() public static method

Determine if a dictionary database file exists in the specified directory.
public static Exists ( string directory ) : bool
directory string The directory to look in.
return bool
        /// <summary>
        /// Determine if a dictionary database file exists in the specified directory.
        /// </summary>
        /// <param name="directory">The directory to look in.</param>
        /// <returns>True if the database file exists, false otherwise.</returns>
        public static bool Exists(string directory)
        {
            if (null == directory)
            {
                throw new ArgumentNullException("directory");
            }

            if (Directory.Exists(directory))
            {
                var defaultConfig = PersistentDictionaryDefaultConfig.GetDefaultDatabaseConfig();
                var config        = new DatabaseConfig()
                {
                    DatabaseFilename = Path.Combine(directory, defaultConfig.DatabaseFilename)
                };
                config.Merge(defaultConfig, MergeRules.KeepExisting);
                return(PersistentDictionaryFile.Exists(config));
            }

            return(false);
        }