29 lines
448 B
JavaScript
Raw Normal View History

import os from "os";
2025-04-14 13:56:55 +02:00
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();
};
2025-04-14 13:56:55 +02:00
listProcesses = async () => {
await psList();
};
}