isDevRoot checks whether the specified root is a dev root. A dev root is defined as a root containing a /dev folder.
()
| 64 | // isDevRoot checks whether the specified root is a dev root. |
| 65 | // A dev root is defined as a root containing a /dev folder. |
| 66 | func (r root) isDevRoot() bool { |
| 67 | stat, err := os.Stat(filepath.Join(string(r), "dev")) |
| 68 | if err != nil { |
| 69 | return false |
| 70 | } |
| 71 | return stat.IsDir() |
| 72 | } |
| 73 | |
| 74 | // getDevRoot returns the dev root associated with the root. |
| 75 | // If the root is not a dev root, this defaults to "/". |