github.com/nxadm/tail@v1.4.12-0.20231010141446-ba755e4d73b6/tail_windows.go (about) 1 // Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail 2 // +build windows 3 4 package tail 5 6 import ( 7 "os" 8 9 "github.com/nxadm/tail/winfile" 10 ) 11 12 // Deprecated: this function is only useful internally and, as such, 13 // it will be removed from the API in a future major release. 14 // 15 // OpenFile proxies a os.Open call for a file so it can be correctly tailed 16 // on POSIX and non-POSIX OSes like MS Windows. 17 func OpenFile(name string) (file *os.File, err error) { 18 return winfile.OpenFile(name, os.O_RDONLY, 0) 19 }