 import Foundation
 import Darwin
 import AppKit
-
-func input() -> String? {
-    let keyboard = FileHandle.standardInput
-    let inputData = keyboard.availableData
-    let input = String(data: inputData, encoding: String.Encoding.utf8)
-    return input
-}
 
 func printUsage() {
     print("usage: saferm [-f | -i] [-dPRrvW] file ...")

            break
        }
        
        if isDir.boolValue {
            dirs.insert(arg)
        } else {
            files.insert(arg)
        }
    }
}

var paths:Set<String> = Set<String>()
if opts.contains("r") {
    paths = paths.union(dirs)
}

paths = paths.union(files)
let sortedPaths = paths.sorted(by: >)

let isForced = opts.contains("f")
for path in paths {
//    if !isForced {
//        print("\(path) (y/n)")
//        while(true)
//        {
//            if let input = input() {
//                input
//            }
//        }
//        
//    }
}
print(sortedPaths)


//let trashUrls = filemanager.urls(for: .trashDirectory, in: .userDomainMask)
//guard !trashUrls.isEmpty else {
//    printUsage()
//    exit(1)
//}
//


let args = Process.arguments.dropFirst()

var opts = Set<Character>()
var dirs = Set<URL>()
var files = Set<URL>()
for arg in args {
    guard let first = arg.characters.first else {
        break
