ProcessHelper class

EXPERIMENTAL

This class is likely to change/replaced.

Annotations
  • @visibleForTesting

Constructors

ProcessHelper()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getParentPID(int? childPid) int
Get the PID of the parent Returns -1 if a parent can't be obtained.
getProcesses() List<ProcessDetails>
Returns a list of running processes.
getProcessesByName(String name) List<ProcessDetails>
Returns the list of ProcessDetails with name. It is quite common for there to be multiple processes with the same name running. If there are no processes with the given name then an empty list is returned. Remember that a process may shutdown at any moment so just because this method returns a process does not mean that the process is still running.
getProcessName(int pid) String?
returns the name of the process for the given pid.
isProcessRunning(String name) bool
Returns true a the process with the given name is currently running.
isRunning(int? pid) bool
returns true if the given pid is still running.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited