query
On this page

locateDominatingFile

lib.filesystem.locateDominatingFile



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

Type

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

Arguments

  • [pattern] The pattern to search for
  • [file] The file to start searching upward from