https://github.com/shakthizen/ps_list
Dart package for getting list of running processes
https://github.com/shakthizen/ps_list
dart dart-package flutter processes
Last synced: 24 days ago
JSON representation
Dart package for getting list of running processes
- Host: GitHub
- URL: https://github.com/shakthizen/ps_list
- Owner: shakthizen
- License: bsd-3-clause
- Created: 2024-07-02T20:44:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T20:50:58.000Z (over 1 year ago)
- Last Synced: 2025-10-23T00:57:43.609Z (8 months ago)
- Topics: dart, dart-package, flutter, processes
- Language: Dart
- Homepage: https://pub.dev/packages/ps_list
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/pearkoder/ps_list/actions/workflows/contributions.yml)
___
# PSList Dart Package
A Dart package that allows you to retrieve a list of running processes and check whether a specific process is running on Linux, macOS, and Windows.
## Features
- Retrieve a list of currently running processes.
- Check whether a specific process is currently running.
- Cross-platform support for Linux, macOS, and Windows.
## Installation
In your `pubspec.yaml` file, add the following dependency:
```yaml
dependencies:
ps_list: ^0.0.2 # Replace with the latest version
```
Then, run:
```bash
$ dart pub get
```
## Usage
```dart
import 'package:ps_list/ps_list.dart';
void main() async {
// Retrieve a list of all running processes
List processes = await PSList.getRunningProcesses();
// Print process details
for (var process in processes) {
print('Process: $process');
}
// Check if a specific process is running
String processName = 'my_process';
bool isRunning = await PSList.isProcessRunning(processName);
if (isRunning) {
print('$processName is running.');
} else {
print('$processName is not running.');
}
}
```
## API
### `Future> getRunningProcesses()`
Returns a list of strings representing the names of currently running processes.
### `Future isProcessRunning(String processName)`
Checks if a process with the specified `processName` is currently running.
- Returns `true` if the process is running.
- Returns `false` if the process is not running.
## Compatibility
This package is compatible with Dart 2.12.0 or higher.
## Contributing
Contributions are welcome! Please feel free to submit a pull request.
Thanks to the following people for their contributions:
## License
This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.