mirror of
https://github.com/hanzoai/s3-cli.git
synced 2026-10-30 18:23:12 +00:00
Vendor the CLI helpers into pkg/, use hanzos3/go, rename the module to hanzoai/s3-cli, and gate the names in cmd/names_test.go. Claude-Session: https://claude.ai/code/session_011i2AG9nwpiKUCVxAdDzYuU
20 lines
352 B
Go
20 lines
352 B
Go
package selfupdate
|
|
|
|
import (
|
|
"syscall"
|
|
"unsafe"
|
|
)
|
|
|
|
func hideFile(path string) error {
|
|
kernel32 := syscall.NewLazyDLL("kernel32.dll")
|
|
setFileAttributes := kernel32.NewProc("SetFileAttributesW")
|
|
|
|
r1, _, err := setFileAttributes.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))), 2)
|
|
|
|
if r1 == 0 {
|
|
return err
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|