Skip to content

Commit 5f9f21d

Browse files
committed
Added userName and fullUserName to ProcessInfo
Marked NSFullUserName() as Unimplemented
1 parent b211099 commit 5f9f21d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Foundation/NSPathUtilities.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,10 @@ public func NSUserName() -> String {
588588
return userName._swiftObject
589589
}
590590

591+
public func NSFullUserName() -> String {
592+
NSUnimplemented()
593+
}
594+
591595
internal func _NSCreateTemporaryFile(_ filePath: String) throws -> (Int32, String) {
592596
let template = "." + filePath + ".tmp.XXXXXX"
593597
let maxLength = Int(PATH_MAX) + 1

Foundation/ProcessInfo.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,12 @@ open class ProcessInfo: NSObject {
140140
open var systemUptime: TimeInterval {
141141
return CFGetSystemUptime()
142142
}
143+
144+
open var userName: String {
145+
return NSUserName()
146+
}
147+
148+
open var fullUserName: String {
149+
return NSFullUserName()
150+
}
143151
}

0 commit comments

Comments
 (0)