RecordingProcessManager constructor

RecordingProcessManager(ProcessManager delegate, Directory destination)

Constructs a new RecordingProcessManager.

This manager will record all process invocations and serialize them to the specified destination. The underlying ProcessManager functionality will be delegated to delegate.

If destination does not already exist, or if it exists and is not empty, a StateError will be thrown.

destination should be treated as opaque. Its contents are intended to be consumed only by ReplayProcessManager and are subject to change between versions of package:process.

Implementation

RecordingProcessManager(this.delegate, this.destination) {
  if (!destination.existsSync() || destination.listSync().isNotEmpty) {
    throw new StateError('Cannot record to ${destination.path}');
  }
}