---
title: "NSFileTypeForHFSTypeCode(_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nsfiletypeforhfstypecode(_:)"
---

# NSFileTypeForHFSTypeCode(_:)

Returns a string encoding a file type code.

## Declaration

```swift
func NSFileTypeForHFSTypeCode(_ hfsFileTypeCode: OSType) -> String!
```

## Parameters

- `hfsFileTypeCode`: An HFS file type code.

## Return Value

Return Value A string that encodes hfsFileTypeCode.

## See Also

### Working with HFS file types

- [NSHFSTypeCodeFromFileType(_:)](foundation/nshfstypecodefromfiletype(_:).md)
- [NSHFSTypeOfFile(_:)](foundation/nshfstypeoffile(_:).md)
