Skip to content

Commit dd4406d

Browse files
committed
[URLResourceValues] Remove redundant NSCoding protocol from some existential types
This matches the Darwin version.
1 parent adc0a1d commit dd4406d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/URL.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ public struct URLResourceValues {
197197
/// An identifier which can be used to compare two file system objects for equality using `isEqual`.
198198
///
199199
/// Two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system. This identifier is not persistent across system restarts.
200-
public var fileResourceIdentifier: (NSCopying & NSCoding & NSSecureCoding & NSObjectProtocol)? { return _get(.fileResourceIdentifierKey) }
200+
public var fileResourceIdentifier: (NSCopying & NSSecureCoding & NSObjectProtocol)? { return _get(.fileResourceIdentifierKey) }
201201

202202
/// An identifier that can be used to identify the volume the file system object is on.
203203
///
204204
/// Other objects on the same volume will have the same volume identifier and can be compared using for equality using `isEqual`. This identifier is not persistent across system restarts.
205-
public var volumeIdentifier: (NSCopying & NSCoding & NSSecureCoding & NSObjectProtocol)? { return _get(.volumeIdentifierKey) }
205+
public var volumeIdentifier: (NSCopying & NSSecureCoding & NSObjectProtocol)? { return _get(.volumeIdentifierKey) }
206206

207207
/// The optimal block size when reading or writing this file's data, or nil if not available.
208208
public var preferredIOBlockSize: Int? { return _get(.preferredIOBlockSizeKey) }
@@ -240,7 +240,7 @@ public struct URLResourceValues {
240240
/// An opaque generation identifier which can be compared using `==` to determine if the data in a document has been modified.
241241
///
242242
/// For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes.
243-
public var generationIdentifier: (NSCopying & NSCoding & NSSecureCoding & NSObjectProtocol)? { return _get(.generationIdentifierKey) }
243+
public var generationIdentifier: (NSCopying & NSSecureCoding & NSObjectProtocol)? { return _get(.generationIdentifierKey) }
244244

245245
/// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume.
246246
///

0 commit comments

Comments
 (0)