INNER CODE UNIT · Swift
getLogFilePath
UnboundTechCo/defyxVPN · ios/PacketTunnel/PacketTunnelProvider.swift:324
func getLogFilePath() -> String {
guard
let groupURL = FileManager.default.containerURL(
forSecurityApplicationGroupIdentifier: "group.de.unboundtech.defyxvpn")
else {
os_log("Error getting file path..")
return "/dev/null"
}
let path = groupURL.appendingPathComponent("warp_logs.txt").path
os_log("FilePath received %@", path)
return path
}
private func saveLogToFile(_ logData: Data) {
let fileName = "warp_logs.txt"
let fileURL = FileManager.default
.urls(for: .documentDirectory, in: .userDomainMask)[0]
.appendingPathComponent(fileName)