Ready update, syntax fix
This commit is contained in:
@@ -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
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user