class_docstr: shared implementation for filesystem path objects.
docstr: return a root-first list of all ancestor directories
  plus the path itself.
docstr_tok: ["return","a","root-first","list","of","all","ancestor","directories","plus","the","path","itself","."]
code: def parts(self, reverse=False):
      """return a root-first list of all ancestor directories
      plus the path itself.
      """
      current = self
      l = [self]
      while 1:
          last = current
          current = current.dirpath()
          if last == current:
              break
          l.append(current)
      if not reverse:
          l.reverse()
      return l
  
imports: import warnings
  import os
  import sys
  import posixpath
  import fnmatch
  import py
label_desc: Use image node_id 22 for calling the PathBase obj's underlying member method code with example usage: obj.parts(reverse) and returns: l