Skip to content

Make URLResourceValues private properties internal #1116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Sources/FoundationEssentials/URL/URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ internal import CoreFoundation_Private.CFURL
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
public struct URLResourceValues {

fileprivate var _values: [URLResourceKey: Any]
fileprivate var _keys: Set<URLResourceKey>
var _values: [URLResourceKey: Any]
var _keys: Set<URLResourceKey>

public init() {
_values = [:]
Expand All @@ -49,19 +49,19 @@ public struct URLResourceValues {
_keys = Set(values.keys)
}

private func contains(_ key: URLResourceKey) -> Bool {
func contains(_ key: URLResourceKey) -> Bool {
return _keys.contains(key)
}

private func _get<T>(_ key: URLResourceKey) -> T? {
func _get<T>(_ key: URLResourceKey) -> T? {
return _values[key] as? T
}

private func _get(_ key: URLResourceKey) -> Bool? {
func _get(_ key: URLResourceKey) -> Bool? {
return (_values[key] as? NSNumber)?.boolValue
}

private func _get(_ key: URLResourceKey) -> Int? {
func _get(_ key: URLResourceKey) -> Int? {
return (_values[key] as? NSNumber)?.intValue
}

Expand Down