---
title: isPackageKey
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/urlresourcekey/ispackagekey
---

# isPackageKey

The key for determining whether the resource is a file package.

## Declaration

```swift
static let isPackageKey: URLResourceKey
```

## Discussion

Discussion The system returns the value as a Boolean NSNumber object read-write in macOS 10.8 and later, and read-only in previous versions. A true value means that the resource is a file package. If you attempt to set or clear this key’s value on a file instead of a directory, the system ignores your attempt. If the directory as a package due to its filename extension or other reason apart from this key, setting this key’s value to false has no effect.

## See Also

### File keys

- [fileAllocatedSizeKey](foundation/urlresourcekey/fileallocatedsizekey.md)
- [fileProtectionKey](foundation/urlresourcekey/fileprotectionkey.md)
- [URLFileProtection](foundation/urlfileprotection.md)
- [fileContentIdentifierKey](foundation/urlresourcekey/filecontentidentifierkey.md)
- [fileResourceIdentifierKey](foundation/urlresourcekey/fileresourceidentifierkey.md)
- [fileResourceTypeKey](foundation/urlresourcekey/fileresourcetypekey.md)
- [URLFileResourceType](foundation/urlfileresourcetype.md)
- [fileSecurityKey](foundation/urlresourcekey/filesecuritykey.md)
- [fileSizeKey](foundation/urlresourcekey/filesizekey.md)
- [isAliasFileKey](foundation/urlresourcekey/isaliasfilekey.md)
- [isRegularFileKey](foundation/urlresourcekey/isregularfilekey.md)
- [isPurgeableKey](foundation/urlresourcekey/ispurgeablekey.md)
- [isSparseKey](foundation/urlresourcekey/issparsekey.md)
- [mayHaveExtendedAttributesKey](foundation/urlresourcekey/mayhaveextendedattributeskey.md)
- [mayShareFileContentKey](foundation/urlresourcekey/maysharefilecontentkey.md)
