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
,
const uint connectionID
)

Parameters

logLocation string

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

connectionID uint

ID of the current connection, so as not to spam error messages.

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);

Meta