|
guard let bytes = FileManager.default.contents(atPath: path) else { |
This should use the non-blocking NIOFileSystem APIs. They're both more easy to use and work correctly even if the file system blocks (Foundation.FileManager blocks the calling thread and uses different implementations on Linux & Darwin).
swift-nio-extras/Sources/NIOCertificateReloading/TimedCertificateReloader.swift
Line 365 in 72a23ea
This should use the non-blocking
NIOFileSystemAPIs. They're both more easy to use and work correctly even if the file system blocks (Foundation.FileManagerblocks the calling thread and uses different implementations on Linux & Darwin).