Would this be okay?

https://pharo.fogbugz.com/f/cases/12991/navigation-enhancement-Path-parentUpTo-aParentDirName





On Feb 25, 2014, at 4:05 AM, Pharo4Stef <pharo4Stef@free.fr> wrote:


hi seb

could you add a test or two and a bug entry so that we include it in FS?

Stef

On 25 Feb 2014, at 03:18, Sebastian Sastre <sebastian@flowingconcept.com> wrote:

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