mapUri method
Map a URI from the execution context to the file that it corresponds to, or map a file to the URI that it corresponds to in the execution context.
Exactly one of the file and uri fields must be provided. If both fields
are provided, then an error of type INVALID_PARAMETER
will be generated.
Similarly, if neither field is provided, then an error of type
INVALID_PARAMETER
will be generated.
If the file field is provided and the value is not the path of a file
(either the file does not exist or the path references something other
than a file), then an error of type INVALID_PARAMETER
will be generated.
If the uri field is provided and the value is not a valid URI or if the
URI references something that is not a file (either a file that does not
exist or something other than a file), then an error of type
INVALID_PARAMETER
will be generated.
If the contextRoot used to create the execution context does not exist,
then an error of type INVALID_EXECUTION_CONTEXT
will be generated.
Implementation
Future<MapUriResult> mapUri(String? id, {String? file, String? uri}) {
final Map m = {'id': id};
if (file != null) m['file'] = file;
if (uri != null) m['uri'] = uri;
return _call('execution.mapUri', m).then(MapUriResult.parse);
}