MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / FindHelperExecutable

Method FindHelperExecutable

src/Squirrel/Utility.cs:344–354  ·  view source on GitHub ↗
(string toFind, IEnumerable<string> additionalDirs = null)

Source from the content-addressed store, hash-verified

342 }
343
344 public static string FindHelperExecutable(string toFind, IEnumerable<string> additionalDirs = null)
345 {
346 additionalDirs = additionalDirs ?? Enumerable.Empty<string>();
347 var dirs = (new[] { Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) })
348 .Concat(additionalDirs ?? Enumerable.Empty<string>());
349
350 var exe = @".\" + toFind;
351 return dirs
352 .Select(x => Path.Combine(x, toFind))
353 .FirstOrDefault(x => File.Exists(x)) ?? exe;
354 }
355
356 static string find7Zip()
357 {

Callers 3

ReleasifyMethod · 0.80

Calls 1

SelectMethod · 0.45

Tested by

no test coverage detected