query
On this page

locateDominatingFile

lib.filesystem.locateDominatingFile

Docs pulled from | This Revision | 35 minutes ago


Find the first directory containing a file matching 'pattern' upward from a given 'file'. Returns 'null' if no directories contain a file matching 'pattern'.

Inputs

pattern

The pattern to search for

file

The file to start searching upward from

Type

RegExp -> Path -> Nullable { path : Path; matches : [ MatchResults ]; }