// Swift, file handling, move file
import Foundation
let fileManager = FileManager.default let sourceURL = URL(fileURLWithPath: "/path/to/source/file") let destinationURL = URL(fileURLWithPath: "/path/to/destination/file")
do { try fileManager.moveItem(at: sourceURL, to: destinationURL) print("File moved successfully") } catch let error { print("Error: (error.localizedDescription)") }
main.swift58 chars3 lines
gistlibby LogSnag