package SPVM::IO {
  has fh : int;
  has offset : long;
  
  enum {
    O_RDONLY,
    O_WRONLY,
    O_RDWR,
    O_APPEND,
    O_CREAT,
    O_TRUNC,
    O_BINARY,
    O_TEXT,
    S_IWRITE,
    S_IREAD,
  }
  sub open : SPVM::IO ($file_name : string, $amode : int[]...) {
    return undef;
  }
  sub read : int ($self :self, $buf : byte[], $buf_offset : int) {
    return 0;
  }
  sub write : int ($self : self, $buf : string) {
    return 0;
  }
  sub lseek : int ($self : self, $offset : long, $origin : int) {
    return 0;
  }
  sub close : int ($self : self) {
    return 0;
  }
  sub DESTROY : void ($self : self) {
    
  }
}
