Example #1
0
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
}
Example #2
0
func (s *FileStorage) Exist(filePath string) (bool, error) {
	return utils.FileExists(s.Retrieve(filePath))
}