file_posix.mx raw

   1  package os
   2  
   3  import (
   4  	"time"
   5  )
   6  
   7  //TODO: re-implement the ErrNoDeadline error in the correct code path
   8  
   9  // Chtimes is a stub, not yet implemented
  10  func Chtimes(name string, atime time.Time, mtime time.Time) error {
  11  	return ErrNotImplemented
  12  }
  13  
  14  // setDeadline sets the read and write deadline.
  15  func (f *File) setDeadline(t time.Time) error {
  16  	if t.IsZero() {
  17  		return nil
  18  	}
  19  	return ErrNotImplemented
  20  }
  21  
  22  // setReadDeadline sets the read deadline, not yet implemented
  23  // A zero value for t means Read will not time out.
  24  func (f *File) setReadDeadline(t time.Time) error {
  25  	if t.IsZero() {
  26  		return nil
  27  	}
  28  	return ErrNotImplemented
  29  }
  30  
  31  // setWriteDeadline sets the write deadline, not yet implemented
  32  // A zero value for t means Read will not time out.
  33  func (f *File) setWriteDeadline(t time.Time) error {
  34  	if t.IsZero() {
  35  		return nil
  36  	}
  37  	return ErrNotImplemented
  38  }
  39