---
title: FSGetCatalogInfo
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1565356-fsgetcataloginfo
---

# FSGetCatalogInfo

## Declaration

```occ
OSErr FSGetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfo, HFSUniStr255 *outName, FSSpecPtr fsSpec, FSRef *parentRef);
```

## Discussion

> **important:** Avoid using this function to determine whether a file has changed. The fractional dates returned by the `FSGetCatalogInfo` function don't compare exactly to the fractional dates returned by the [NSURL](../devlink-1764781.md) date properties, because of differences in rounding and precision.

Instead, call the [getResourceValue(_:forKey:)](../foundation/nsurl/getresourcevalue(_:forkey:).md) method of `NSURL` with [generationIdentifierKey](../foundation/urlresourcekey/generationidentifierkey.md). On file systems that don't support generation identifiers, call the `getResourceValue(_:forKey:)` method with [contentModificationDateKey](../foundation/urlresourcekey/contentmodificationdatekey.md).

## See Also

### Accessing Information About Files and Directories

- [PBGetCatalogInfoAsync](1565934-pbgetcataloginfoasync.md)
- [PBGetCatalogInfoSync](1566328-pbgetcataloginfosync.md)
- [PBSetCatalogInfoAsync](1566340-pbsetcataloginfoasync.md)
- [PBSetCatalogInfoSync](1565271-pbsetcataloginfosync.md)
- [FSSetCatalogInfo](1566580-fssetcataloginfo.md)
