func (db *DB) SetDataDirectory(dataDirectory string) error {
	// Create dataDirectory if it doesn't exist
	if _, err := os.Stat(dataDirectory); os.IsNotExist(err) {
		os.Mkdir(dataDirectory, os.ModePerm)
	}

	status := db.dbClient.ConfigSet("dir", dataDirectory)
	if status.Err() != nil {
		return fmt.Errorf("Error when setting data directory for database: \n%s", status.Err())
	}
	return nil
}
// SetDataDirectory sets the data directory for the redis client
SetDataDirectory sets the data directory for the redis client
// SetDataDirectory sets the data directory for the redis client
func (db *DB) SetDataDirectory(dataDirectory string) error {
	if _, err := os.Stat(dataDirectory); os.IsNotExist(err) {
		os.Mkdir(dataDirectory, os.ModePerm)
	}
	status := db.dbClient.ConfigSet("dir", dataDirectory)
	if status.Err() != nil {
		return fmt.Errorf("Error when setting data directory for database: \n%s", status.Err())
	}
	return nil
}
func ( db * DB ) SetDataDirectory ( dataDirectory string ) error { if _ , err := os . Stat ( dataDirectory ) ; os . IsNotExist ( err ) { os . Mkdir ( dataDirectory , os . ModePerm ) } status := db . dbClient . ConfigSet ( " " , dataDirectory ) if status . Err ( ) != nil { return fmt . Errorf ( " \n " , status . Err ( ) ) } return nil }
SetDataDirectory sets the data directory for the redis client
SetDataDirectory sets the data directory for the redis client
// Create dataDirectory if it doesn't exist