<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLResourceKey/isPackageKey",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSURLIsPackageKey"
  },
  "title" : "isPackageKey"
}
-->

# isPackageKey

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

```
static let isPackageKey: URLResourceKey
```

## Discussion

The system returns the value as a Boolean [`NSNumber`](/documentation/Foundation/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)