Skip to content

Commit

Permalink
feat: ItemProvider underlyingType can return new type, propertyList.
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-coye committed Mar 20, 2024
1 parent 31c7519 commit e0352d5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public extension NSItemProvider {
case isDirectory
/// The item is a compressed file
case isCompressedData(identifier: String)
/// The item is a property list
case isPropertyList
/// The item is of a miscellaneous type
case isMiscellaneous(identifier: String)
/// This should not happen, no type identifier was found
Expand Down Expand Up @@ -93,6 +95,8 @@ public extension NSItemProvider {
return .isDirectory
} else if hasItemConformingToAnyOfTypeIdentifiers(Self.compressedUTIIdentifiers) {
return .isCompressedData(identifier: typeIdentifier)
} else if hasItemConformingToTypeIdentifier(UTI.propertyList.identifier) {
return .isPropertyList
} else {
return .isMiscellaneous(identifier: typeIdentifier)
}
Expand Down

0 comments on commit e0352d5

Please sign in to comment.