github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/fileutils/file_utils_windows.go (about) 1 package fileutils 2 3 import ( 4 "os" 5 "syscall" 6 ) 7 8 const ( 9 FILE_ATTRIBUTE_REPARSE_POINT = 0x0400 10 ) 11 12 func IsRegular(f os.FileInfo) bool { 13 if fileattrs, ok := f.Sys().(*syscall.Win32FileAttributeData); ok { 14 if fileattrs.FileAttributes&FILE_ATTRIBUTE_REPARSE_POINT != 0 { 15 return false 16 } 17 } 18 return f.Mode().IsRegular() 19 }