     case NotAuthorized
 }
 
+// swiftlint:disable:next type_body_length
 class ViewController: UIViewController, UITextFieldDelegate {
     @IBOutlet weak var host: UITextField!
     @IBOutlet weak var port: UITextField!


        self.deleteFilesSwitch.setOn(false, animated: false)

        self.statusText.contentInset = UIEdgeInsetsMake(0, -self.statusText.textContainer.lineFragmentPadding, 0, -self.statusText.textContainer.lineFragmentPadding);
    }

    func checkAuthorization() {

        }
    }

    func deleteRemotePhotos(sftpSession: NMSFTP, filesToBeKept: Set<String>) {
        NSLog("Set of files to be kept: " + filesToBeKept.joinWithSeparator(", "))

        let remoteDirectoryListing = sftpSession.contentsOfDirectoryAtPath(self.remoteDir.text!)
        var filesAlreadyRemote = Set<String>()
        // swiftlint:disable:next force_cast
        for remoteFile in remoteDirectoryListing as! [NMSFTPFile] {
            if !remoteFile.isDirectory {
                filesAlreadyRemote.insert(remoteFile.filename)
            }
        }

        NSLog("Remote directory listing: " + filesAlreadyRemote.joinWithSeparator(", "))

        let filesToRemove = filesAlreadyRemote.subtract(filesToBeKept)

        NSLog("Files to remove: " + filesToRemove.joinWithSeparator(", "))

        for fileToRemove in filesToRemove {
            let fullFilePath = self.remoteDir.text! + "/" + fileToRemove
            self.updateStatus("Removing remote file " + fullFilePath)
            sftpSession.removeFileAtPath(fullFilePath)
        }
    }

    func updateStatus(status: String, count: Int = 0, total: Int = 0, percentage: Float = -1) {
        NSLog("Status change: " + status)

