예제 #1
0
파일: storage.go 프로젝트: Kehao/playGo
func (s *FileStorage) CheckRootDir() (bool, error) {
	if Exist, _ := utils.FileExists(s.Root); !Exist {
		err := os.MkdirAll(s.Root, 0700)
		if err == nil {
			return true, nil
		}
		return false, err
	}
	return true, nil
}
예제 #2
0
파일: storage.go 프로젝트: Kehao/playGo
func (s *FileStorage) Exist(filePath string) (bool, error) {
	return utils.FileExists(s.Retrieve(filePath))
}