Skip to content

Commit 6fa2706

Browse files
authored
Fix public visibility of Data writing and reading options (swiftlang#399)
1 parent 693b5a9 commit 6fa2706

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,9 +2012,9 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
20122012
public let rawValue: UInt
20132013
public init(rawValue: UInt) { self.rawValue = rawValue }
20142014

2015-
static let mappedIfSafe = ReadingOptions(rawValue: 1 << 0)
2016-
static let uncached = ReadingOptions(rawValue: 1 << 1)
2017-
static let alwaysMapped = ReadingOptions(rawValue: 1 << 3)
2015+
public static let mappedIfSafe = ReadingOptions(rawValue: 1 << 0)
2016+
public static let uncached = ReadingOptions(rawValue: 1 << 1)
2017+
public static let alwaysMapped = ReadingOptions(rawValue: 1 << 3)
20182018
}
20192019

20202020
// This is imported from the ObjC 'option set', which is actually a combination of an option and an enumeration (file protection).
@@ -2023,25 +2023,25 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
20232023
public init(rawValue: UInt) { self.rawValue = rawValue }
20242024

20252025
/// An option to write data to an auxiliary file first and then replace the original file with the auxiliary file when the write completes.
2026-
static let atomic = WritingOptions(rawValue: 1 << 0)
2026+
public static let atomic = WritingOptions(rawValue: 1 << 0)
20272027

20282028
/// An option that attempts to write data to a file and fails with an error if the destination file already exists.
2029-
static let withoutOverwriting = WritingOptions(rawValue: 1 << 1)
2029+
public static let withoutOverwriting = WritingOptions(rawValue: 1 << 1)
20302030

20312031
/// An option to not encrypt the file when writing it out.
2032-
static let noFileProtection = WritingOptions(rawValue: 0x10000000)
2032+
public static let noFileProtection = WritingOptions(rawValue: 0x10000000)
20332033

20342034
/// An option to make the file accessible only while the device is unlocked.
2035-
static let completeFileProtection = WritingOptions(rawValue: 0x20000000)
2035+
public static let completeFileProtection = WritingOptions(rawValue: 0x20000000)
20362036

20372037
/// An option to allow the file to be accessible while the device is unlocked or the file is already open.
2038-
static let completeFileProtectionUnlessOpen = WritingOptions(rawValue: 0x30000000)
2038+
public static let completeFileProtectionUnlessOpen = WritingOptions(rawValue: 0x30000000)
20392039

20402040
/// An option to allow the file to be accessible after a user first unlocks the device.
2041-
static let completeFileProtectionUntilFirstUserAuthentication = WritingOptions(rawValue: 0x40000000)
2041+
public static let completeFileProtectionUntilFirstUserAuthentication = WritingOptions(rawValue: 0x40000000)
20422042

20432043
/// An option the system uses when determining the file protection options that the system assigns to the data.
2044-
static let fileProtectionMask = WritingOptions(rawValue: 0xf0000000)
2044+
public static let fileProtectionMask = WritingOptions(rawValue: 0xf0000000)
20452045
}
20462046
#endif
20472047

0 commit comments

Comments
 (0)