I am building an app that once it is connected to a specific local network it displays an activity indicator then begins downloading a zip file of images, once the images have downloaded it unzips the file, stops the indicator and then performs segue to the next View controller. I have all the functionality working but don't know how to watch for when a function has finished. My Donloader class looks like this: 

```
class Downloader {

    let documentsUrl: URL =  FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first as URL!

    required init() {

        self.load()
    }

    func load() {

        // Create destination URL
        let destinationFileUrl = documentsUrl.appendingPathComponent("Images.zip")

        //Create URL to the source file you want to download
        let fileURL = URL(string: "http://127.0.0.1:4567/download")//FIXME for production

        //Create Session
        let sessionConfig = URLSessionConfiguration.default
        let session = URLSession(configuration: sessionConfig)
        let request = URLRequest(url:fileURL!)

        let task = session.downloadTask(with: request) { (tempLocalUrl, response, error) in

            if let tempLocalUrl = tempLocalUrl, error == nil {
                // Success
                if let statusCode = (response as? HTTPURLResponse)?.statusCode {
                    print("Successfully downloaded. Status code: \(statusCode)")
                }

                do {

                    try FileManager.default.copyItem(at: tempLocalUrl, to: destinationFileUrl)
                } catch (let writeError) {

                    print("Error creating a file \(destinationFileUrl) : \(writeError)")
                }

            } else {

                print("Error took place while downloading a file. Error description: %@", (error?.localizedDescription)! as String);
            }
        }
        task.resume()
    }
}

```

and my unzip function within my File class looks like this: 

```
func unZip() {

    let zipFileURL = documentsURL?.appendingPathComponent("Images.zip")

    SSZipArchive.unzipFile(atPath: (zipFileURL?.path)!, toDestination: (documentsURL?.path)!)

    var directoryContents = [URL]()

    do {
        // Get the directory contents urls (including subfolders urls)
        directoryContents = try fileManager.contentsOfDirectory(at: documentsURL!, includingPropertiesForKeys: nil, options: [])
    } catch let error as NSError {

        print(error.localizedDescription)
    }

    let pngFiles = directoryContents.filter{ $0.pathExtension == "png" }//FIXME change file types if needed

    imageNamesArray = pngFiles.map{ $0.deletingPathExtension().lastPathComponent }
}

```

I've had a look at closures but don't understand how to call them from outside of the class or another ViewController. Any help would be great thanks.