---
title: "NSHFSTypeOfFile(_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nshfstypeoffile(_:)"
---

# NSHFSTypeOfFile(_:)

Returns a string encoding a file type.

## Declaration

```swift
func NSHFSTypeOfFile(_ fullFilePath: String!) -> String!
```

## Parameters

- `fullFilePath`: The full absolute path of a file.

## Return Value

Return Value A string that encodes fullFilePath’s HFS file type, or nil if the operation was not successful

## See Also

### Working with HFS file types

- [NSFileTypeForHFSTypeCode(_:)](foundation/nsfiletypeforhfstypecode(_:).md)
- [NSHFSTypeCodeFromFileType(_:)](foundation/nshfstypecodefromfiletype(_:).md)
