feat: dir and file check

This commit is contained in:
Noah Hsu
2022-06-23 16:09:22 +08:00
parent d77dea733f
commit b971b13362
4 changed files with 26 additions and 11 deletions

View File

@ -2,23 +2,15 @@ package errs
import (
"errors"
pkgerr "github.com/pkg/errors"
)
var (
ObjectNotFound = errors.New("object not found")
NotImplement = errors.New("not implement")
NotSupport = errors.New("not support")
RelativePath = errors.New("access using relative path is not allowed")
NotImplement = errors.New("not implement")
NotSupport = errors.New("not support")
RelativePath = errors.New("access using relative path is not allowed")
MoveBetweenTwoAccounts = errors.New("can't move files between two account, try to copy")
UploadNotSupported = errors.New("upload not supported")
NotFolder = errors.New("not a folder")
NotFile = errors.New("not a file")
MetaNotFound = errors.New("meta not found")
)
func IsObjectNotFound(err error) bool {
return pkgerr.Cause(err) == ObjectNotFound
}