---
title: fileAttributes
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/filemanager/directoryenumerator/fileattributes
---

# fileAttributes

A dictionary with the attributes of the most recently returned file or subdirectory (as referenced by the pathname).

## Declaration

```swift
var fileAttributes: [FileAttributeKey : Any]? { get }
```

## Discussion

Discussion See the description of the fileAttributes(atPath:traverseLink:) method of FileManager for details on obtaining the attributes from the dictionary.

## See Also

### Getting File and Directory Attributes

- [directoryAttributes](foundation/filemanager/directoryenumerator/directoryattributes.md)
- [level](foundation/filemanager/directoryenumerator/level.md)
