fileutil_openbsd.go 684 B

123456789101112131415161718192021222324252627
  1. // Copyright (c) 2014 The fileutil Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package fileutil
  5. import (
  6. "io"
  7. "os"
  8. )
  9. const hasPunchHole = false
  10. // PunchHole deallocates space inside a file in the byte range starting at
  11. // offset and continuing for len bytes. Similar to FreeBSD, this is
  12. // unimplemented.
  13. func PunchHole(f *os.File, off, len int64) error {
  14. return nil
  15. }
  16. // Unimplemented on OpenBSD.
  17. func Fadvise(f *os.File, off, len int64, advice FadviseAdvice) error {
  18. return nil
  19. }
  20. // IsEOF reports whether err is an EOF condition.
  21. func IsEOF(err error) bool { return err == io.EOF }