---
title: typeAndCreator
framework: fileprovider
role: symbol
role_heading: Instance Property
path: fileprovider/nsfileprovideritemprotocol/typeandcreator
---

# typeAndCreator

The file type and creator codes for the item.

## Declaration

```swift
optional var typeAndCreator: NSFileProviderTypeAndCreator { get }
```

## Discussion

Discussion This property contains two values: the file type code and the creator code. The system synchronizes both codes at the same time, so define both, even if you’re just changing one. If you modify this property, the system sets the NSFileProviderTypeAndCreator value passed to the createItem(basedOn:fields:contents:options:request:completionHandler:) or modifyItem(_:baseVersion:changedFields:contents:options:request:completionHandler:) methods. The system also writes the type and creator codes in the FileInfo structure, if relevant.

## See Also

### Managing Metadata

- [extendedAttributes](fileprovider/nsfileprovideritemprotocol/extendedattributes.md)
- [fileSystemFlags](fileprovider/nsfileprovideritemprotocol/filesystemflags.md)
- [NSFileProviderFileSystemFlags](fileprovider/nsfileproviderfilesystemflags.md)
- [tagData](fileprovider/nsfileprovideritemprotocol/tagdata.md)
- [userInfo](fileprovider/nsfileprovideritemprotocol/userinfo.md)
- [favoriteRank](fileprovider/nsfileprovideritemprotocol/favoriterank.md)
- [NSFileProviderFavoriteRankUnranked](fileprovider/nsfileproviderfavoriterankunranked.md)
