1// +build windows
2
3package watcher
4
5import (
6	"syscall"
7)
8
9func isHiddenFile(path string) (bool, error) {
10	pointer, err := syscall.UTF16PtrFromString(path)
11	if err != nil {
12		return false, err
13	}
14
15	attributes, err := syscall.GetFileAttributes(pointer)
16	if err != nil {
17		return false, err
18	}
19
20	return attributes&syscall.FILE_ATTRIBUTE_HIDDEN != 0, nil
21}
22