hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

platform_trunc.ha (231B)


      1 // License: MPL-2.0
      2 use errors;
      3 use rt;
      4 
      5  fn platform_trunc(fd: file, ln: size) (void | error) = {
      6  	match (rt::ftruncate(fd: int, ln: rt::off_t)) {
      7  	case void => void;
      8  	case let e: rt::errno => return errors::errno(e);
      9  	};
     10  };