Find answers here
Menu
I want to move a file, from its original location, to a different one.
// Create a FileManager instance
let fileManager = NSFileManager.defaultManager()
// Move 'hello.swift' to 'subfolder/hello.swift'
do {
try fileManager.moveItemAtPath("hello.swift", toPath: "subfolder/hello.swift")
}
catch let error as NSError {
print("Ooops! Something went wrong: \(error)")
}
Objective-C to Swift language converter | Visit iSwift Stories
WE CODE.