txt: ## out-buffer.md
  out-buffer
  
  Combined from primary sources listed below.
  
  # [In IO::Handle](#___top "go to top of document")[§](#(IO::Handle)_method_out-buffer "direct link")
  
  See primary documentation
  [in context](/type/IO/Handle#method_out-buffer)
  for **method out-buffer**.
  
  ```raku
  method out-buffer(--> Int:D) is rw
  ```
  
  Controls output buffering and can be set via an argument to [open](/routine/open). Takes an `int` as the size of the buffer to use (zero is acceptable). Can take a [`Bool`](/type/Bool): `True` means to use default, implementation-defined buffer size; `False` means to disable buffering (equivalent to using `0` as buffer size).
  
  Lastly, can take a [`Nil`](/type/Nil) to enable TTY-based buffering control: if the handle [is a TTY](/routine/t), the buffering is disabled, otherwise, default, implementation-defined buffer size is used.
  
  See [flush](/routine/flush) to write out data currently in the buffer. Changing buffer size flushes the filehandle.
  
  ```raku
  given 'foo'.IO.open: :w, :1000out-buffer {
      .say: 'Hello world!'; # buffered
      .out-buffer = 42;       # buffer resized; previous print flushed
      .say: 'And goodbye';
      .close; # closing the handle flushes the buffer
  }
  
  ```
  