Exemplo n.º 1
0
// Forces the session to be saved to disk. Note that the sessions are saved to disk on each change currently, since there are very few changes.
func (s *Session) Save() (err os.Error) {
	filename := "data/shared/sessions/" + strconv.Itoa64(s.ID)
	fmt.Println(filename)
	err = ini.Save(filename, s.settings)
	if err != nil {
		dlog.Println("Warning: Error loading session data:", err)
		return err
	}
	return
}
Exemplo n.º 2
0
func (u *User) Save() os.Error {
	filename := u.fileName()
	err := ini.Save(filename, u.settings)
	return err
}