1 Reply
      Latest reply: Nov 21, 2016 1:20 AM by eskimo RSS
      piegreb Level 1 Level 1 (0 points)

        Hi,

        I am logging all the attributes of my file with the following code:

         

        
        MDItemRef item = MDItemCreate(NULL, (__bridge CFStringRef)path);
        
        CFArrayRef attributeNames = MDItemCopyAttributeNames(item);
        NSDictionary* attributes = CFBridgingRelease(MDItemCopyAttributes(item, attributeNames));
        
        for(NSDictionary *key in attributes) {
          NSLog(@"[%@] = %@", key, [attributes objectForKey:key]);
        }
        
        CFRelease(item);
        

         

        When I do the same with mdimport -d3 "path" I get the same properties but kMDItemTextContent. I tried calling MDItemCopyAttribute directly with that property and it returns nil. How do I get this property programmatically?


        Thanks,

        Pierre