---
title: FileAttributeKey
framework: foundation
role: symbol
role_heading: Structure
path: foundation/fileattributekey
---

# FileAttributeKey

Keys in dictionaries used to get and set file attributes.

## Declaration

```swift
struct FileAttributeKey
```

## Discussion

Discussion These keys are used with the methods listed in the Getting and Setting Attributes topic of FileManager.

## Topics

### Creating a File Attribute Key

- [init(_:)](foundation/fileattributekey/init(_:).md)
- [init(rawValue:)](foundation/fileattributekey/init(rawvalue:).md)

### Accessing File Attributes

- [appendOnly](foundation/fileattributekey/appendonly.md)
- [busy](foundation/fileattributekey/busy.md)
- [creationDate](foundation/fileattributekey/creationdate.md)
- [deviceIdentifier](foundation/fileattributekey/deviceidentifier.md)
- [extensionHidden](foundation/fileattributekey/extensionhidden.md)
- [groupOwnerAccountID](foundation/fileattributekey/groupowneraccountid.md)
- [groupOwnerAccountName](foundation/fileattributekey/groupowneraccountname.md)
- [hfsCreatorCode](foundation/fileattributekey/hfscreatorcode.md)
- [hfsTypeCode](foundation/fileattributekey/hfstypecode.md)
- [immutable](foundation/fileattributekey/immutable.md)
- [modificationDate](foundation/fileattributekey/modificationdate.md)
- [ownerAccountID](foundation/fileattributekey/owneraccountid.md)
- [ownerAccountName](foundation/fileattributekey/owneraccountname.md)
- [posixPermissions](foundation/fileattributekey/posixpermissions.md)
- [protectionKey](foundation/fileattributekey/protectionkey.md)
- [referenceCount](foundation/fileattributekey/referencecount.md)
- [size](foundation/fileattributekey/size.md)
- [systemFileNumber](foundation/fileattributekey/systemfilenumber.md)
- [systemFreeNodes](foundation/fileattributekey/systemfreenodes.md)
- [systemFreeSize](foundation/fileattributekey/systemfreesize.md)
- [systemNodes](foundation/fileattributekey/systemnodes.md)
- [systemNumber](foundation/fileattributekey/systemnumber.md)
- [systemSize](foundation/fileattributekey/systemsize.md)
- [type](foundation/fileattributekey/type.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Supporting Types

- [FileManager.DirectoryEnumerationOptions](foundation/filemanager/directoryenumerationoptions.md)
- [FileManager.SearchPathDirectory](foundation/filemanager/searchpathdirectory.md)
- [FileManager.SearchPathDomainMask](foundation/filemanager/searchpathdomainmask.md)
- [FileAttributeType](foundation/fileattributetype.md)
- [FileProtectionType](foundation/fileprotectiontype.md)
- [URLFileProtection](foundation/urlfileprotection.md)
