mirror of
https://github.com/logos-storage/logos-storage-installer.git
synced 2026-01-02 21:43:11 +00:00
29 lines
448 B
JavaScript
29 lines
448 B
JavaScript
import os from "os";
|
|
import psList from "ps-list";
|
|
|
|
export class OsService {
|
|
constructor() {
|
|
this.platform = os.platform();
|
|
}
|
|
|
|
isWindows = () => {
|
|
return this.platform === "win32";
|
|
};
|
|
|
|
isDarwin = () => {
|
|
return this.platform === "darwin";
|
|
};
|
|
|
|
isLinux = () => {
|
|
return this.platform === "linux";
|
|
};
|
|
|
|
getWorkingDir = () => {
|
|
return process.cwd();
|
|
};
|
|
|
|
listProcesses = async () => {
|
|
await psList();
|
|
};
|
|
}
|