OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / github.com / ipfs / go-ipfs-files / is_hidden_windows.go
diff --git a/vendor/github.com/ipfs/go-ipfs-files/is_hidden_windows.go b/vendor/github.com/ipfs/go-ipfs-files/is_hidden_windows.go
deleted file mode 100644 (file)
index 7419f93..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// +build windows
-
-package files
-
-import (
-       "path/filepath"
-       "strings"
-
-       windows "golang.org/x/sys/windows"
-)
-
-func IsHidden(name string, f Node) bool {
-
-       fName := filepath.Base(name)
-
-       if strings.HasPrefix(fName, ".") && len(fName) > 1 {
-               return true
-       }
-
-       fi, ok := f.(FileInfo)
-       if !ok {
-               return false
-       }
-
-       p, e := windows.UTF16PtrFromString(fi.AbsPath())
-       if e != nil {
-               return false
-       }
-
-       attrs, e := windows.GetFileAttributes(p)
-       if e != nil {
-               return false
-       }
-       return attrs&windows.FILE_ATTRIBUTE_HIDDEN != 0
-}