fileutil_plan9.go 723 B

12345678910111213141516171819202122232425
  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. // PunchHole deallocates space inside a file in the byte range starting at
  10. // offset and continuing for len bytes. Unimplemented on Plan 9.
  11. func PunchHole(f *os.File, off, len int64) error {
  12. return nil
  13. }
  14. // Fadvise predeclares an access pattern for file data. See also 'man 2
  15. // posix_fadvise'. Unimplemented on Plan 9.
  16. func Fadvise(f *os.File, off, len int64, advice FadviseAdvice) error {
  17. return nil
  18. }
  19. // IsEOF reports whether err is an EOF condition.
  20. func IsEOF(err error) bool { return err == io.EOF }