You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
521 B

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