txt: ## cleanup.md
  cleanup
  
  Combined from primary sources listed below.
  
  # [In IO::Path](#___top "go to top of document")[§](#(IO::Path)_method_cleanup "direct link")
  
  See primary documentation
  [in context](/type/IO/Path#method_cleanup)
  for **method cleanup**.
  
  ```raku
  method cleanup(IO::Path:D: --> IO::Path:D)
  ```
  
  Returns a new path that is a canonical representation of the invocant path, cleaning up any extraneous path parts:
  
  ```raku
  "foo/./././..////bar".IO.cleanup.say;      # OUTPUT: «"foo/../bar".IO␤»
  IO::Path::Win32.new("foo/./././..////bar")
      .cleanup.say; "foo\..\bar".IO;         # OUTPUT: «"foo\..\bar".IO␤»
  ```
  
  Note that no filesystem access is made. See also [`resolve`](/routine/resolve).
  