1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 07:40:19 +00:00
This commit is contained in:
astaxie
2013-11-05 22:23:48 +08:00
parent 076bd0b440
commit c8f86652a3
5 changed files with 57 additions and 1 deletions

View File

@ -116,6 +116,15 @@ func (fp *FileProvider) SessionRead(sid string) (SessionStore, error) {
return ss, nil
}
func (fp *FileProvider) SessionExist(sid string) bool {
_, err := os.Stat(path.Join(fp.savePath, string(sid[0]), string(sid[1]), sid))
if err == nil {
return true
} else {
return false
}
}
func (fp *FileProvider) SessionDestroy(sid string) error {
os.Remove(path.Join(fp.savePath))
return nil