Cinder
Cinder copied to clipboard
findAncestor* path
This PR adds two new functions, findAncestorFile() and findAncesorDir(). These are utility functions for locating a relative path somewhere up the disk hierarchy from another path.
A good example is how Cinder automatically locates the assets directory relative to the application, and in fact this PR reimplements that functionality to use findAncestorDir() internally. Also useful for a scenario where you have an external resource like an .exe dependency. An example call would be auto toolPath = findAncestorFile( getAppPath(), "external\\tools\\example.exe" )