storeProcessesIn function

List<({String command, int pid})> storeProcessesIn(
  1. Map<int, String> table,
  2. String workspacePath
)

The rows of table that are store processes running out of workspacePath.

Implementation

List<({int pid, String command})> storeProcessesIn(
  Map<int, String> table,
  String workspacePath,
) {
  final prefixes = _workspacePrefixes(workspacePath);
  return [
    for (final entry in table.entries)
      if (_namesWorkspace(entry.value, prefixes))
        (pid: entry.key, command: entry.value),
  ];
}