Skip to content

Instantly share code, notes, and snippets.

@SjB
Last active October 23, 2015 16:21
Show Gist options
  • Select an option

  • Save SjB/c1ba0cb8b890a0cf1a86 to your computer and use it in GitHub Desktop.

Select an option

Save SjB/c1ba0cb8b890a0cf1a86 to your computer and use it in GitHub Desktop.
Cake FindDirectory function
Func<string, DirectoryPath> FindDirectory = delegate(string glob) {
var dirs = GetDirectories(glob);
foreach (var dir in dirs)
return dir;
Error("Can't find any file with glob {0}", glob);
return Directory("");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment