fileutil_arm.go 745 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. Not supported on ARM.
  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 ARM.
  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 }