Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ list(APPEND _SwiftFoundation_versions
"6.1"
"6.2"
"6.3"
"6.4"
)

# Each availability name to define
Expand Down
7 changes: 3 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CompilerPluginSupport
let availabilityTags: [_Availability] = [
_Availability("FoundationPreview"), // Default FoundationPreview availability
]
let versionNumbers = ["6.0.2", "6.1", "6.2", "6.3", "6.4"]
let versionNumbers = ["6.0.2", "6.1", "6.2", "6.3"]

// Availability Macro Utilities

Expand Down Expand Up @@ -140,8 +140,7 @@ let package = Package(
"ProcessInfo/CMakeLists.txt",
"FileManager/CMakeLists.txt",
"URL/CMakeLists.txt",
"NotificationCenter/CMakeLists.txt",
"ProgressManager/CMakeLists.txt",
"NotificationCenter/CMakeLists.txt"
],
cSettings: [
.define("_GNU_SOURCE", .when(platforms: [.linux]))
Expand Down Expand Up @@ -186,7 +185,7 @@ let package = Package(
"Locale/CMakeLists.txt",
"Calendar/CMakeLists.txt",
"CMakeLists.txt",
"Predicate/CMakeLists.txt",
"Predicate/CMakeLists.txt"
],
cSettings: wasiLibcCSettings,
swiftSettings: [
Expand Down
2 changes: 0 additions & 2 deletions Sources/FoundationEssentials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_library(FoundationEssentials
Logging.swift
OutputBuffer.swift
Platform.swift
Progress+Stub.swift
SortComparator.swift
UUID_Wrappers.swift
UUID.swift
Expand All @@ -46,7 +45,6 @@ add_subdirectory(Locale)
add_subdirectory(NotificationCenter)
add_subdirectory(Predicate)
add_subdirectory(ProcessInfo)
add_subdirectory(ProgressManager)
add_subdirectory(PropertyList)
add_subdirectory(String)
add_subdirectory(TimeZone)
Expand Down
16 changes: 3 additions & 13 deletions Sources/FoundationEssentials/Data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
## This source file is part of the Swift open source project
##
## Copyright (c) 2024-2025 Apple Inc. and the Swift project authors
## Copyright (c) 2024 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
Expand All @@ -13,23 +13,13 @@
##===----------------------------------------------------------------------===##

target_sources(FoundationEssentials PRIVATE
Representations/Data+Inline.swift
Representations/Data+InlineSlice.swift
Representations/Data+LargeSlice.swift
Representations/Data+Representation.swift
Representations/DataStorage.swift

Collections+DataProtocol.swift
ContiguousBytes.swift
Data.swift
Data+Base64.swift
Data+Bridging.swift
Data+Deprecated.swift
Data+Error.swift
Data+Iterator.swift
Data+Reading.swift
Data+Searching.swift
Data+Stub.swift
Data+Writing.swift
Data.swift
DataProtocol.swift
PathOrURL.swift
Pointers+DataProtocol.swift)
5 changes: 1 addition & 4 deletions Sources/FoundationEssentials/Data/ContiguousBytes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2018-2025 Apple Inc. and the Swift project authors
// Copyright (c) 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -39,9 +39,6 @@ extension ArraySlice : ContiguousBytes where Element == UInt8 { }
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
extension ContiguousArray : ContiguousBytes where Element == UInt8 { }

@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
extension Data : ContiguousBytes { }

//===--- Pointer Conformances ---------------------------------------------===//

@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
Expand Down
52 changes: 1 addition & 51 deletions Sources/FoundationEssentials/Data/Data+Base64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2023-2025 Apple Inc. and the Swift project authors
// Copyright (c) 2023-2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -25,56 +25,6 @@ import WinSDK
import WASILibc
#endif

#if !FOUNDATION_FRAMEWORK
extension Data {

@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
public struct Base64EncodingOptions : OptionSet, Sendable {
public let rawValue: UInt

public init(rawValue: UInt) {
self.rawValue = rawValue
}
/// Set the maximum line length to 64 characters, after which a line ending is inserted.
public static let lineLength64Characters = Base64EncodingOptions(rawValue: 1 << 0)
/// Set the maximum line length to 76 characters, after which a line ending is inserted.
public static let lineLength76Characters = Base64EncodingOptions(rawValue: 1 << 1)
/// When a maximum line length is set, specify that the line ending to insert should include a carriage return.
public static let endLineWithCarriageReturn = Base64EncodingOptions(rawValue: 1 << 4)
/// When a maximum line length is set, specify that the line ending to insert should include a line feed.
public static let endLineWithLineFeed = Base64EncodingOptions(rawValue: 1 << 5)
}

@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
public struct Base64DecodingOptions : OptionSet, Sendable {
public let rawValue: UInt

public init(rawValue: UInt) {
self.rawValue = rawValue
}
/// Modify the decoding algorithm so that it ignores unknown non-Base-64 bytes, including line ending characters.
public static let ignoreUnknownCharacters = Base64DecodingOptions(rawValue: 1 << 0)
}
}
#else
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
extension Data {
// These types are typealiased to the `NSData` options for framework builds only.
public typealias Base64EncodingOptions = NSData.Base64EncodingOptions
public typealias Base64DecodingOptions = NSData.Base64DecodingOptions
}
#endif //!FOUNDATION_FRAMEWORK

extension Data.Base64EncodingOptions {
/// Use the base64url alphabet to encode the data
@available(FoundationPreview 6.3, *)
public static let base64URLAlphabet = Self(rawValue: 1 << 6)

/// Omit the `=` padding characters in the end of the base64 encoded result
@available(FoundationPreview 6.3, *)
public static let omitPaddingCharacter = Self(rawValue: 1 << 7)
}

@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
extension Data {

Expand Down
119 changes: 0 additions & 119 deletions Sources/FoundationEssentials/Data/Data+Bridging.swift

This file was deleted.

63 changes: 0 additions & 63 deletions Sources/FoundationEssentials/Data/Data+Deprecated.swift

This file was deleted.

Loading