Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path like `c:`, `c:\` or `c:/`).
(path string)
| 35 | // Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path |
| 36 | // like `c:`, `c:\` or `c:/`). |
| 37 | func IsRootedDiskPath(path string) bool { |
| 38 | return GetEncodedRootLength(path) > 0 |
| 39 | } |
| 40 | |
| 41 | // Determines whether a path consists only of a path root. |
| 42 | func IsDiskPathRoot(path string) bool { |