Using the following code I am able to delete a file which is moved to trash, but there is no "Put Back" functionality. When I right click the file in trash only delete immediately option is available.
let srcURL = URL(fileURLWithPath:filename!)
var trashedPath: NSURL!
try! FileManager.default.trashItem(at: srcURL, resultingItemURL: &trashedPath)
My program is a Finder Quick Action Service written in Swift 5.4, where I am passing one or more filenames with path of image files like .heic, .png, .tiff, and converting it to jpg. I then want to delete the source file and move them to trash. As the files can be from different directories I want to provide the facility where the user can restore the deleted source file to its proper place.
What should be done to get "Put Back" option?