github.com/anthropics/anthropic-sdk-go@v1.70.1/internal/filestore/filestore_windows.go (about) 1 //go:build windows 2 3 package filestore 4 5 import ( 6 "errors" 7 "os" 8 ) 9 10 // FileStore's guarantees depend on O_NOFOLLOW semantics that Windows does not 11 // provide, so rather than degrading to a best-effort implementation, Open 12 // refuses. This is a deployment condition, not caller input, so it is a plain 13 // error rather than a *FileStoreError. 14 15 func platformCheck() error { 16 return errors.New("filestore: requires O_NOFOLLOW support; unsupported on this platform") 17 } 18 19 // replaceViaTemp and openRegularFile are unreachable — Open never hands out a 20 // store here — but must exist for the package to compile. 21 22 func replaceViaTemp(string, []byte, bool) error { return platformCheck() } 23 24 func openRegularFile(string, string) (*os.File, error) { return nil, platformCheck() }