You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Foundation
// Prints file:///C:/Users/alex%00/
// Notice the null byte after the user
print(FileManager.default.homeDirectoryForCurrentUser)
// Same here
print(URL(fileURLWithPath:("~"asNSString).expandingTildeInPath))
// Prints
// file:///C:/Users/alex%00/alex/
// file:///C:/Users/alex%00/alex/alex/
// file:///C:/Users/alex%00/alex/alex/alex/
// file:///C:/Users/alex%00/alex/alex/alex/alex/
// file:///C:/Users/alex%00/alex/alex/alex/alex/alex/
// .. continues forever
letenumerator=FileManager.default.enumerator(at:FileManager.default.homeDirectoryForCurrentUser, includingPropertiesForKeys:nil)whilelet url = enumerator?.nextObject()as?URL{print("\(url)\r\n")}