windows fix
This commit is contained in:
parent
0d2f8856f6
commit
fb68b269fa
|
@ -80,14 +80,3 @@ func Wdir() string {
|
|||
}
|
||||
return dir
|
||||
}
|
||||
|
||||
// isHidden check if a file or a path is hidden
|
||||
func isHidden(path string) bool {
|
||||
arr := strings.Split(path[len(Wdir()):], "/")
|
||||
for _, elm := range arr {
|
||||
if strings.HasPrefix(elm, ".") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package realize
|
||||
|
||||
import "strings"
|
||||
|
||||
// isHidden check if a file or a path is hidden
|
||||
func isHidden(path string) bool {
|
||||
arr := strings.Split(path[len(Wdir()):], "/")
|
||||
for _, elm := range arr {
|
||||
if strings.HasPrefix(elm, ".") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package realize
|
||||
|
||||
import "syscall"
|
||||
|
||||
// isHidden check if a file or a path is hidden
|
||||
func isHidden(path string) bool {
|
||||
p, e := syscall.UTF16PtrFromString(path)
|
||||
|
|
Loading…
Reference in New Issue