txt: ## sibling.md
  sibling
  
  Combined from primary sources listed below.
  
  # [In IO::Path](#___top "go to top of document")[§](#(IO::Path)_method_sibling "direct link")
  
  See primary documentation
  [in context](/type/IO/Path#method_sibling)
  for **method sibling**.
  
  ```raku
  method sibling(IO::Path:D: Str() $sibling --> IO::Path:D)
  ```
  
  Allows to reference a sibling file or directory. Returns a new `IO::Path` based on the invocant, with the [`.basename`](/type/IO/Path#method_basename) changed to `$sibling`. The `$sibling` is allowed to be a multi-part path fragment; see also [`.add`](/type/IO/Path#method_add).
  
  ```raku
  say '.bashrc'.IO.sibling: '.bash_aliases'; # OUTPUT: «.bash_aliases".IO␤»
  say '/home/camelia/.bashrc'.IO.sibling: '.bash_aliases';
  # OUTPUT: «/home/camelia/.bash_aliases".IO␤»
  
  say '/foo/' .IO.sibling: 'bar';  # OUTPUT: «/bar".IO␤»
  say '/foo/.'.IO.sibling: 'bar';  # OUTPUT: «/foo/bar".IO␤»
  ```
  