Skip to content

Commit

Permalink
Updated version, removed obsoleted properties
Browse files Browse the repository at this point in the history
  • Loading branch information
amosavian committed Mar 27, 2018
1 parent 162439f commit c3f44ea
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 30 deletions.
9 changes: 3 additions & 6 deletions FilesProvider.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "FilesProvider"
s.version = "0.23.0"
s.version = "0.24.0"
s.summary = "FileManager replacement for Local and Remote (WebDAV/FTP/Dropbox/OneDrive/SMB2) files on iOS and macOS."

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -66,10 +66,7 @@ Pod::Spec.new do |s|
# the deployment target. You can optionally include the target after the platform.
#

# s.platform = :ios
# s.platform = :ios, "8.0"

# When using multiple platforms
s.swift_version = "4.0"
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
# s.watchos.deployment_target = "2.0"
Expand Down Expand Up @@ -122,7 +119,7 @@ Pod::Spec.new do |s|
# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"

# s.library = "iconv"
s.library = "xml2"
# s.libraries = "iconv", "xml2"


Expand Down
6 changes: 2 additions & 4 deletions FilesProvider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
799396601D48B7BF00086753 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_VERSION_STRING = 0.22.0;
BUNDLE_VERSION_STRING = 0.24.0;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
Expand Down Expand Up @@ -759,7 +759,7 @@
799396611D48B7BF00086753 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_VERSION_STRING = 0.22.0;
BUNDLE_VERSION_STRING = 0.24.0;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
Expand Down Expand Up @@ -796,7 +796,6 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
BUNDLE_VERSION_STRING = 0.23.0;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -832,7 +831,6 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
BUNDLE_VERSION_STRING = 0.23.0;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down
2 changes: 1 addition & 1 deletion Sources/FTPFileProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ open class FTPFileProvider: FileProviderBasicRemote, FileProviderOperations, Fil
/**
Uploads files in chunk if `true`, Otherwise It will uploads entire file/data as single stream.
- Note: Due to an internal bug in `NSURLSessionStreamTask`, it must be true when using Apple's stream task,
- Note: Due to an internal bug in `NSURLSessionStreamTask`, it must be `true` when using Apple's stream task,
otherwise it will occasionally throw `Assertion failed: (_writeBufferAlreadyWrittenForNextWrite == 0)`
fatal error. My implementation of `FileProviderStreamTask` doesn't have this bug.
Expand Down
4 changes: 2 additions & 2 deletions Sources/FTPHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ internal extension FTPFileProvider {
completionHandler: @escaping (_ contents: [FileObject], _ error: Error?) -> Void) -> Progress? {
let progress = Progress(totalUnitCount: -1)
let queue = DispatchQueue(label: "\(self.type).recursiveList")
let group = DispatchGroup()
queue.async {
let group = DispatchGroup()
var result = [FileObject]()
var success = true
group.enter()
self.contentsOfDirectory(path: path, completionHandler: { (files, error) in
success = success && (error == nil)
if let error = error {
completionHandler([], error)
group.leave()
completionHandler([], error)
return
}

Expand Down
12 changes: 0 additions & 12 deletions Sources/FileProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,6 @@ public protocol FileProviderOperations: FileProviderBasic {
}

public extension FileProviderOperations {
/// *OBSOLETED:* Use Use FileProviderReadWrite.writeContents(path:, data:, completionHandler:) method instead.
@available(*, obsoleted: 0.23, message: "Use FileProviderReadWrite.writeContents(path:, data:, completionHandler:) method instead.")
@discardableResult
public func create(file: String, at: String, contents data: Data?, completionHandler: SimpleCompletionHandler) -> Progress? {
let path = (at as NSString).appendingPathComponent(file)
return (self as? FileProviderReadWrite)?.writeContents(path: path, contents: data, completionHandler: completionHandler)
}

@discardableResult
public func moveItem(path: String, to: String, completionHandler: SimpleCompletionHandler) -> Progress? {
return self.moveItem(path: path, to: to, overwrite: false, completionHandler: completionHandler)
Expand Down Expand Up @@ -1081,10 +1073,6 @@ public enum FileOperationType: CustomStringConvertible {
}
}

/// Allows to get progress or cancel an in-progress operation, useful for remote providers
@available(*, obsoleted: 1.0, message: "Use Foudation.Progress class instead.")
public protocol OperationHandle {}

/// Delegate methods for reporting provider's operation result and progress, when it's ready to update
/// user interface.
/// All methods are called in main thread to avoids UI bugs.
Expand Down
5 changes: 0 additions & 5 deletions Sources/HTTPFileProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ import Foundation
open class HTTPFileProvider: FileProviderBasicRemote, FileProviderOperations, FileProviderReadWrite {
open class var type: String { fatalError("HTTPFileProvider is an abstract class. Please implement \(#function) in subclass.") }
open let baseURL: URL?

/// **OBSOLETED** Current active path used in `contentsOfDirectory(path:completionHandler:)` method.
@available(*, obsoleted: 0.22, message: "This property is redundant with almost no use internally.")
open var currentPath: String = ""

open var dispatch_queue: DispatchQueue
open var operation_queue: OperationQueue {
willSet {
Expand Down

0 comments on commit c3f44ea

Please sign in to comment.