Fixed FTP/SSL issue, Fixed error descriptions for HTTP and FTP

- Changed thumbnail and properties method signature to support progress
This commit is contained in:
Amir Abbas
2018-02-24 23:41:45 +03:30
parent 1bf42b489d
commit fd89a04c8e
10 changed files with 65 additions and 45 deletions
+4 -2
View File
@@ -54,7 +54,7 @@ extension LocalFileProvider: ExtendedFileProvider {
}
}
open func thumbnailOfFile(path: String, dimension: CGSize? = nil, completionHandler: @escaping ((_ image: ImageClass?, _ error: Error?) -> Void)) {
open func thumbnailOfFile(path: String, dimension: CGSize? = nil, completionHandler: @escaping ((_ image: ImageClass?, _ error: Error?) -> Void)) -> Progress? {
let dimension = dimension ?? CGSize(width: 64, height: 64)
(dispatch_queue).async {
var thumbnailImage: ImageClass? = nil
@@ -84,9 +84,10 @@ extension LocalFileProvider: ExtendedFileProvider {
completionHandler(scaledImage, nil)
}
}
return nil
}
open func propertiesOfFile(path: String, completionHandler: @escaping ((_ propertiesDictionary: [String: Any], _ keys: [String], _ error: Error?) -> Void)) {
open func propertiesOfFile(path: String, completionHandler: @escaping ((_ propertiesDictionary: [String: Any], _ keys: [String], _ error: Error?) -> Void)) -> Progress? {
(dispatch_queue).async {
let fileExt = (path as NSString).pathExtension.lowercased()
var getter: ((_ fileURL: URL) -> (prop: [String: Any], keys: [String]))?
@@ -117,6 +118,7 @@ extension LocalFileProvider: ExtendedFileProvider {
completionHandler(dic, keys, nil)
}
return nil
}
}