validatePath<T extends SyntheticInput> static method
Validates an input/output path.
Throws ErrorOf
if the synthetic input is specified as
usign the type parameter LibDir) and the path does not start with lib
.
Implementation
static void validatePath<T extends SyntheticInput>(String path) {
if (!SyntheticInput.isValidPath<T>(path)) {
throw ErrorOf<SyntheticInput>(
message: 'Invalid file path found.',
expectedState: 'A path starting with \'lib\'.'
'To access files outside \'lib\' change the builder '
'type parameter to [PackageDir].',
invalidState: 'The actual path is: $path.');
}
}