-
Notifications
You must be signed in to change notification settings - Fork 22
Location
Yevhen Bobrov edited this page Apr 6, 2020
·
3 revisions
Helper methods for location-related things.
using static Nake.Location;
// will print out current directory
Console.WriteLine(CurrentDirectory);
// you can dynamically substitute current directory
// this will affect some functions in utility library
// which rely on Location.CurrentDirectory;
CurrentDirectory = "C:\Temp";
// will print out file path of the calling script
Console.WriteLine(NakeScriptPath());
// will print out directory path of the calling script
Console.WriteLine(NakeScriptDirectory());
// will print out path to directory in which Nake was started
Console.WriteLine(NakeStartupDirectory);
// will print working directory passed to Nake runner,
// will default to NakeStartupDirectory otherwise
Console.WriteLine(NakeWorkingDirectory);