| Framework | CoreServices/CoreServices.h |
| Companion guide | |
| Declared in | MDLineage.h |
The MDLineage functions can be used to set, alter, and store data concerning the relationships between different versions of the same logical file. Lineage information is stored on files using extended attributes. The lineage for a file can be retrieved or searched for using the Spotlight metadata attribute kMDItemDocumentLineage.
Creates and returns a new, unique lineage.
CFDictionaryRef MDLineageCreate ( CFAllocatorRef allocator );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
A new, globally unique lineage, or NULL if there was an error. Ownership follows the Create Rule.
MDLineage.hCreates and returns a new lineage descending from a given file.
CFDictionaryRef MDLineageCreateBranchFromFile ( CFAllocatorRef allocator, CFURLRef fileURL );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The URL for a file from which to create branched lineage.
A new lineage descending from the data in fileURL, or NULL if there was no lineage data associated with fileURL or if there was an error. Ownership follows the Create Rule.
MDLineage.hCreates and returns a new, unique lineage using data from a given file.
CFDictionaryRef MDLineageCreateFromFile ( CFAllocatorRef allocator, CFURLRef fileURL );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The URL for a file from which to copy lineage data.
A new, globally unique lineage using the data from fileURL, or NULL if there was no lineage data associated with fileURL or if there was an error. Ownership follows the Create Rule.
MDLineage.hRemoves any existing lineage from a given file.
Boolean MDLineageRemoveFromFile ( CFURLRef fileURL );
The file from which to remove all lineage data.
true if all lineage data was removed from the file at fileURL, otherwise false. If there was no lineage data on the file, returns true.
MDLineage.hWrites the given lineage data to a given file.
MDLineageSetOnFile ( CFDictionaryRef lineage, CFURLRef fileURL );
Lineage data obtained from one of the MDLineageCreate functions.
The URL for a file on which to write the lineage.
true if the operation succeeded, otherwise false.
This function overwrites any lineage data already marked on the file.
MDLineage.hLast updated: 2006-07-13