txt: ## flush.md
  flush
  
  Combined from primary sources listed below.
  
  # [In IO::Handle](#___top "go to top of document")[§](#(IO::Handle)_method_flush "direct link")
  
  See primary documentation
  [in context](/type/IO/Handle#method_flush)
  for **method flush**.
  
  ```raku
  method flush(IO::Handle:D: --> True)
  ```
  
  Will flush the handle, writing any of the buffered data. Returns `True` on success; otherwise, [fails](/routine/fail) with [`X::IO::Flush`](/type/X/IO/Flush).
  
  ```raku
  given "foo".IO.open: :w {
      LEAVE .close;
      .print: 'something';
      'foo'.IO.slurp.say; # (if the data got buffered) OUTPUT: «␤»
      .flush;             # flush the handle
      'foo'.IO.slurp.say; # OUTPUT: «something␤»
  }
  
  ```
  