OperatingSystem

interface OperatingSystem

OperatingSystem Represents an operating system and its key attributes, such as processes, file system, network parameters, system uptime, and more.

Provides methods to interact with processes, file system, and system services.

Author

N7ghtm4r3

Inheritors

OperatingSystemImpl

Properties

Link copied to clipboard
abstract val bitness: Int

bitness The bitness of the operating system (e.g., 32-bit, 64-bit).

Link copied to clipboard

currentProcess The currently running process of the operating system.

Link copied to clipboard
abstract val currentThread: OSThread

currentThread The currently running thread of the operating system.

Link copied to clipboard
abstract val family: String

family The family or type of the operating system (e.g., "Windows", "Linux").

Link copied to clipboard
abstract val fileSystem: FileSystem

fileSystem The file system information of the operating system, including file stores and descriptors.

Link copied to clipboard

internetProtocolStats The internet protocol statistics related to network connections, including TCP and UDP statistics and IP connections.

Link copied to clipboard
abstract val isElevated: Boolean

isElevated A flag indicating whether the operating system is running with elevated privileges (e.g., as an administrator).

Link copied to clipboard
abstract val manufacturer: String

manufacturer The manufacturer of the operating system (e.g., "Microsoft", "Apple").

Link copied to clipboard

networkParams The network parameters of the operating system, including host name, domain name, DNS servers, and default gateways.

Link copied to clipboard
abstract val processCount: Int

processCount The total number of processes running on the operating system.

Link copied to clipboard
abstract val processId: Int

processId The process ID of the currently running operating system process.

Link copied to clipboard
abstract val services: List<OSService>

services The list of services running on the operating system.

Link copied to clipboard
abstract val sessions: List<OSSession>

sessions The list of user sessions currently active on the operating system.

Link copied to clipboard
abstract val systemBootTime: Long

systemBootTime The time in milliseconds when the system was last booted (Unix timestamp).

Link copied to clipboard
abstract val systemUptime: Long

systemUptime The system uptime in milliseconds since the operating system started.

Link copied to clipboard
abstract val threadCount: Int

threadCount The total number of threads running on the operating system.

Link copied to clipboard
abstract val threadId: Int

threadId The thread ID of the currently running thread.

Link copied to clipboard

versionInfo The version information of the operating system, including version number, build, etc.

Functions

Link copied to clipboard
abstract fun getOSDesktopWindows(visibleOnly: Boolean): List<OSDesktopWindow>

Retrieves the desktop windows of the operating system.

Link copied to clipboard
abstract fun getProcess(pid: Int): OSProcess

Retrieves a single process by its process ID.

Link copied to clipboard
abstract fun getProcesses(): List<OSProcess>

Retrieves the list of all running processes on the operating system.

abstract fun getProcesses(pids: Collection<Int>): List<OSProcess>

Retrieves the list of processes specified by their process IDs.