Ready update, syntax fix

This commit is contained in:
Amir Abbas Mousavian
2016-07-06 01:21:56 +04:30
parent 8442769c3b
commit 0dab051a2e
3 changed files with 18 additions and 12 deletions
+6 -11
View File
@@ -194,14 +194,9 @@ If you want to retrieve a portion of file you should can `contentsAtPath` method
### TODO List
[] TCPSocket test (using telnet)
[] SMB2 protocol support using TCPSocketClient
[] FTP/FTPS protocol support using TCPSocketClient
[] Dropbox support
[] Amazon S3 support
[] SMB1 protocol implementation
- [ ] TCPSocket test (using telnet)
- [ ] SMB2 protocol support using TCPSocketClient
- [ ] FTP/FTPS protocol support using TCPSocketClient
- [ ] Dropbox support
- [ ] Amazon S3 support
- [ ] SMB1 protocol implementation
+11
View File
@@ -7,6 +7,12 @@
//
import Foundation
#if (iOS)
import UIKit
#endif
#if (OSX)
import Cocoa
#endif
public enum FileType: String {
case Directory
@@ -171,6 +177,11 @@ public protocol ExtendedFileProvider: FileProvider {
func thumbnailOfFileAtPath(path: String, dimension: CGSize, completionHandler: ((image: UIImage?, error: ErrorType?) -> Void))
func propertiesOfFileAtPath(path: String, completionHandler: ((propertiesDictionary: [String: AnyObject], keys: [String], error: ErrorType?) -> Void))
}
#elseif (OSX)
public protocol ExtendedFileProvider: FileProvider {
func thumbnailOfFileAtPath(path: String, dimension: CGSize, completionHandler: ((image: NSImage?, error: ErrorType?) -> Void))
func propertiesOfFileAtPath(path: String, completionHandler: ((propertiesDictionary: [String: AnyObject], keys: [String], error: ErrorType?) -> Void))
}
#endif
public enum FileOperation {
+1 -1
View File
@@ -264,7 +264,7 @@ public class LocalFileProvider: FileProvider {
}
}
public func searchFilesAtPath(path: String, recursive: Bool, query: String, foundItemHandler: ((FileObjectClass) -> Void)?, completionHandler: ((files: [FileObjectClass], error: ErrorType?) -> Void)) {
public func searchFilesAtPath(path: String, recursive: Bool, query: String, foundItemHandler: ((FileObject) -> Void)?, completionHandler: ((files: [FileObject], error: ErrorType?) -> Void)) {
dispatch_async(dispatch_queue) {
let iterator = self.fileManager.enumeratorAtURL(self.absoluteURL(path), includingPropertiesForKeys: nil, options: recursive ? NSDirectoryEnumerationOptions() : .SkipsSubdirectoryDescendants) { (url, e) -> Bool in
completionHandler(files: [], error: e)