func (cfg *Config) Save(path string) error { content := cfg.serialize() cfg.rawContent = content cfg.path = path cfg.content = content cfg.arraylize() return com.WriteFileWithCreatePath(path, cfg.content) }
func (sess *Session) saveSession(sid string, object interface{}) error { fullpath := sess.getPath(sid) str, err := com.Encode(object) err = com.WriteFileWithCreatePath(fullpath, string(str)) return err }