MCPcopy
hub / github.com/eddycjy/go-gin-example / CheckPermission

Function CheckPermission

pkg/file/file.go:31–35  ·  view source on GitHub ↗

CheckPermission check if the file has permission

(src string)

Source from the content-addressed store, hash-verified

29
30// CheckPermission check if the file has permission
31func CheckPermission(src string) bool {
32 _, err := os.Stat(src)
33
34 return os.IsPermission(err)
35}
36
37// IsNotExistMkDir create a directory if it does not exist
38func IsNotExistMkDir(src string) error {

Callers 2

CheckImageFunction · 0.92
MustOpenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected