validateWritableDirectory

Validates that dir is a directory and files can be created inside of it.

void
validateWritableDirectory
(
string dir
,
lazy string msg = "`%s` is not a writable directory: %s"
)

Parameters

dir string

Path of the directory to be tested.

msg string

Error details in case of failure

Throws

darg_plus.exception.ValidationError if dir is not a directory or files cannot be created within.

See Also

validate, std.algorithm.searching.endsWith

Meta