temporaryDirectory
The standard directory for temporary files.
Declaration
static var temporaryDirectory: URL { get }Mentioned in
Discussion
In iOS, this directory is within the app’s sandbox directory. In macOS, it’s within the app’s sandbox directory for sandboxed apps, or in a path under /var if the app isn’t sandboxed.
This computed property is equivalent to calling NSSearchPathForDirectoriesInDomains(_:_:_:) with the FileManager.SearchPathDirectory.itemReplacementDirectory parameter.