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