establishLogLocation

Verifies that a log directory exists, complaining if it's invalid, creating it if it doesn't exist.

version(WithPrinterPlugin)
package
establishLogLocation
(
const string logLocation
,)

Parameters

logLocation string

String of the location directory we want to store logs in.

naggedAboutDir bool

Reference bool that will be set to true if we've already complained about the log location not being a directory.

Return Value

Type: auto

A bool whether or not the log location is valid.

Examples

assert(!("~/logs".isDir));
bool locationIsOkay = establishLogLocation(plugin, "~/logs");
assert("~/logs".isDir);