                    completion: getResultCallback(completion: completion))
   }
 
+  /// Updates the metadata associated with an object at the current path.
+  ///
+  /// - Parameters:
+  ///   - metadata A `StorageMetadata` object with the metadata to update.
+  ///   - completion A completion block which returns a `Result` enum with either the
+  ///                object metadata or an `Error`.
   func updateMetadata(_ metadata: StorageMetadata,
                       completion: @escaping (Result<StorageMetadata, Error>) -> Void) {
     return updateMetadata(metadata, completion: getResultCallback(completion: completion))
   }
 
+  /// Asynchronously downloads the object at the current path to a specified system filepath.
+  ///
+  /// - Parameters:
+  ///   - toFile A file system URL representing the path the object should be downloaded to.
+  ///   - completion A completion block that fires when the file download completes. The
+  ///                block returns a `Result` enum with either an NSURL pointing to the file
+  ///                path of the downloaded file or an `Error`.
+  ///
+  /// - Returns: A `StorageDownloadTask` that can be used to monitor or manage the download.
   func write(toFile: URL, completion: @escaping (Result<URL, Error>)
     -> Void) -> StorageDownloadTask {
     return write(toFile: toFile, completion: getResultCallback(completion: completion))

                   completion: getResultCallback(completion: completion))
  }

  func putFile(from: URL,
               metadata: StorageMetadata? = nil,
               completion: @escaping (Result<StorageMetadata, Error>) -> Void)


import FirebaseStorage

/// Generates a closure that returns a `Result` type from a closure that returns an optional type
/// and `Error`.
///
/// - Parameters:
///   - completion: A completion block returning a `Result` enum with either a generic object or
///                 an `Error`.
/// - Returns: A closure parameterized with an optional generic and optional `Error` to match
///            Objective C APIs.
private func getResultCallback<T>(
  completion: @escaping (Result<T, Error>) -> Void
) -> (_: T?, _: Error?) -> Void {
