Just made this convenience, sharing:

Path>>parentUpTo: aParentDirName
        "Answers the path of the parent dir with name aParentDirName or root if 
not found."
        
        self withParents reversed do:[:dir|
                dir basename = aParentDirName ifTrue:[^dir]].
        
        ^ Path root

Reply via email to