Skip to content

Commit

Permalink
Made FileProviders equatable
Browse files Browse the repository at this point in the history
  • Loading branch information
amosavian committed Feb 13, 2017
1 parent 12ff3a4 commit 93359d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/FileProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public protocol FileProviderBasic: class {
func url(of path: String?) -> URL
}

public extension FileProviderBasic {
extension FileProviderBasic {
/// The maximum number of queued operations that can execute at the same time.
///
/// The default value of this property is `OperationQueue.defaultMaxConcurrentOperationCount`.
Expand All @@ -111,6 +111,11 @@ public extension FileProviderBasic {
}
}

func ==(lhs: FileProviderBasic, rhs: FileProviderBasic) -> Bool {
if lhs === rhs { return true }
return lhs.baseURL == rhs.baseURL && lhs.isPathRelative == rhs.isPathRelative && lhs.currentPath == rhs.currentPath && lhs.credential == rhs.credential
}

/// Cancels all active underlying tasks
public var fileProviderCancelTasksOnInvalidating = true

Expand Down

0 comments on commit 93359d5

Please sign in to comment.