<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileAttributeType",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSFileAttributeType"
  },
  "title" : "FileAttributeType"
}
-->

# FileAttributeType

Values representing a file’s type attribute.

```
struct FileAttributeType
```

## Discussion

These strings are the possible values for the [`type`](/documentation/Foundation/FileAttributeKey/type) attribute key contained in the dictionary object returned by [`attributesOfItem(atPath:)`](/documentation/Foundation/FileManager/attributesOfItem(atPath:)).

## Topics

### Creating a File Attribute Type

[`init(rawValue:)`](/documentation/Foundation/FileAttributeType/init(rawValue:))

Creates a file attribute type value.

### Accessing File Type Attributes

[`typeBlockSpecial`](/documentation/Foundation/FileAttributeType/typeBlockSpecial)

A block special file.

[`typeCharacterSpecial`](/documentation/Foundation/FileAttributeType/typeCharacterSpecial)

A character special file.

[`typeDirectory`](/documentation/Foundation/FileAttributeType/typeDirectory)

A directory.

[`typeRegular`](/documentation/Foundation/FileAttributeType/typeRegular)

A regular file.

[`typeSocket`](/documentation/Foundation/FileAttributeType/typeSocket)

A socket.

[`typeSymbolicLink`](/documentation/Foundation/FileAttributeType/typeSymbolicLink)

A symbolic link.

[`typeUnknown`](/documentation/Foundation/FileAttributeType/typeUnknown)

A file whose type is unknown.



---

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)