I am trying to check FileAttributeType. Here is my logic to compare:-
let attributes = try fileManager.attributesOfItem(atPath: "/Users/AUSER/Desktop/Downloads")
print(attributes)
if (attributes[FileAttributeKey.type] as AnyObject? == FileAttributeType.typeSymbolicLink ){
print("YESSS \(attributes[FileAttributeKey.type])")
}
Error-> Binary operator '==' cannot be applied to operands of type 'AnyObject?' and 'FileAttributeType'