MCPcopy Create free account
hub / github.com/dim-an/cod / checkExecutable

Function checkExecutable

util/find_path.go:28–37  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

26)
27
28func checkExecutable(file string) error {
29 d, err := os.Stat(file)
30 if err != nil {
31 return err
32 }
33 if m := d.Mode(); !m.IsDir() && m&0111 != 0 {
34 return nil
35 }
36 return os.ErrPermission
37}
38
39func FindExecutable(name, dir, pathVar string) (string, error) {
40 if strings.ContainsRune(name, os.PathSeparator) {

Callers 1

FindExecutableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected