feat: Add OsFs-compliant support for Readlink, Symlink and Lstat
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package pathext
|
||||
|
||||
func IsRoot(path string) bool {
|
||||
import "strings"
|
||||
|
||||
func IsRoot(path string, trim bool) bool {
|
||||
if trim && len(strings.TrimSpace(path)) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
return path == "" || path == "." || path == "/" || path == "./"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user