Google celebrates Hispanic Heritage Month. See how.

Incoming.fromSvcPath constructor

*[<Null safety>](*


Initializes Incoming with a Directory that is bound to /svc of this component.

If you are launching a component use the Incoming() constructor to get an unbound directory.


factory Incoming.fromSvcPath() {
  if (!io.Directory(_serviceRootPath).existsSync()) {
    final componentName = io.Platform.script.pathSegments
        .lastWhere((_) => true, orElse: () => '???');
    throw Exception(
        'Attempting to connect to the /svc directory for [$componentName] failed. '
        'This is an indication that the system is not in a valid state.');
  final channel = Channel.fromFile(_serviceRootPath);
  final directory = DirectoryProxy()
  return Incoming.withDirectory(directory);