resourceDirectory function
Retrieves a test resource Directory
.
"Test resources" are files stored (by default) under the test/resources/
directory of the project root. This prefix may be changed, using the
prefix
argument.
Arguments
String path
- the relative path (from theprefix
by default). An empty string will provide the prefixed root directory.String prefix
- the path prefix from the project root (defaults totest/resources
).
Return
A Directory
reference to the specified resource.
Example
Directory resourceDir = resourceDirectory('data/dir');
Implementation
Directory resourceDirectory({
String path = '',
String prefix = _defaultPrefix,
}) =>
Directory('${_resourceRoot(prefix)}$path');