Skip to content

Commit

Permalink
Added userName and fullUserName to ProcessInfo
Browse files Browse the repository at this point in the history
Marked NSFullUserName() as Unimplemented
  • Loading branch information
pvieito committed Feb 11, 2018
1 parent b211099 commit 5f9f21d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Foundation/NSPathUtilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ public func NSUserName() -> String {
return userName._swiftObject
}

public func NSFullUserName() -> String {
NSUnimplemented()
}

internal func _NSCreateTemporaryFile(_ filePath: String) throws -> (Int32, String) {
let template = "." + filePath + ".tmp.XXXXXX"
let maxLength = Int(PATH_MAX) + 1
Expand Down
8 changes: 8 additions & 0 deletions Foundation/ProcessInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,12 @@ open class ProcessInfo: NSObject {
open var systemUptime: TimeInterval {
return CFGetSystemUptime()
}

open var userName: String {
return NSUserName()
}

open var fullUserName: String {
return NSFullUserName()
}
}

0 comments on commit 5f9f21d

Please sign in to comment.