userName
Returns the account name of the current user.
var userName: String { get }
Returns the account name of the current user.
var userName: String { get }
import FoundationEssentials
final class ProcessInfo
A collection of information about the current process.
@frozen struct String
A Unicode string value that is a collection of characters.
static let processInfo: ProcessInfo
var activeProcessorCount: Int { get }
The number of active processing cores available on the computer.
var arguments: [String] { get }
Array of strings with the command-line arguments for the process.
var environment: [String : String] { get }
The variable names (keys) and their values in the environment from which the process was launched.
var fullUserName: String { get }
Returns the full name of the current user.
var globallyUniqueString: String { get }
Global unique identifier for the process.
var hostName: String { get }
The name of the host computer on which the process is executing.
var operatingSystemVersion: OperatingSystemVersion { get }
The version of the operating system on which the process is executing.
var operatingSystemVersionString: String { get }
A string containing the version of the operating system on which the process is executing.
var physicalMemory: UInt64 { get }
The amount of physical memory on the computer in bytes.
var processIdentifier: Int32 { get }
The identifier of the process (often called process ID).
var processName: String { get set }
The name of the process.
var processorCount: Int { get }
The number of processing cores available on the computer.
var systemUptime: TimeInterval { get }
The amount of time the system has been awake since the last time it was restarted.
func isOperatingSystemAtLeast(_ version: OperatingSystemVersion) -> Bool
Returns a Boolean value indicating whether the version of the operating system on which the process is executing is the same or later than the given version.