From: Intransition Date: 2010-06-24T21:32:38+09:00 Subject: Re: Finding a project's root directory On Jun 23, 6:43 pm, Jeremy Hinegardner wrote: > On Thu, Jun 24, 2010 at 03:43:09AM +0900, Intransition wrote: > > As I continue to work  project development tools I repeatedly run into > > the case of needing a reliable way to identify the project's root > > directory, i.e. to ascend up the directories until it is found. > > > So far the best idea of come up with is to look for .git/, .hg/ or as > > a fallback, README*. > > > Have any ideas for more reliable means? > > I use the parent directory of the lib/ directory as project root. Thanks Jeremy. I'm using lib/ as the fallback in place of README*. I also added a .root/ check to .git and .hg, so if all else fails people can add that to their project.