fileutil_solaris.go 726 B

123456789101112131415161718192021222324252627
  1. // Copyright (c) 2013 jnml. 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. // +build go1.3
  5. package fileutil
  6. import (
  7. "io"
  8. "os"
  9. )
  10. // PunchHole deallocates space inside a file in the byte range starting at
  11. // offset and continuing for len bytes. Not supported on Solaris.
  12. func PunchHole(f *os.File, off, len int64) error {
  13. return nil
  14. }
  15. // Fadvise predeclares an access pattern for file data. See also 'man 2
  16. // posix_fadvise'. Not supported on Solaris.
  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 }