---
title: "getInfoForFile(_:application:type:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsworkspace/getinfoforfile(_:application:type:)"
---

# getInfoForFile(_:application:type:)

Retrieves information about the specified file.

## Declaration

```swift
func getInfoForFile(_ fullPath: String, application appName: AutoreleasingUnsafeMutablePointer<NSString?>?, type: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool
```

## Parameters

- `fullPath`: The full path to the desired file.
- `appName`: The app the system would use to open the file.
- `type`: On input, a pointer to a string object variable; on return, if the method is successful, this variable contains a string object with the filename extension or encoded HFS file type of the file.

## Return Value

Return Value true if this method successfully retrieved the information, or false if it couldn’t find the file or the app isn’t associated with the file.

## Discussion

Discussion You can safely call this method from any thread of your app.

## See Also

### Related Documentation

- [icon(forFiles:)](appkit/nsworkspace/icon(forfiles:).md)
- [icon(forFile:)](appkit/nsworkspace/icon(forfile:).md)

### Requesting Information

- [urlForApplication(toOpen:)](appkit/nsworkspace/urlforapplication(toopen:)-7qkzf.md)
- [urlForApplication(toOpen:)](appkit/nsworkspace/urlforapplication(toopen:)-95cvp.md)
- [urlForApplication(withBundleIdentifier:)](appkit/nsworkspace/urlforapplication(withbundleidentifier:).md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-ualk.md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-60rkm.md)
- [urlsForApplications(withBundleIdentifier:)](appkit/nsworkspace/urlsforapplications(withbundleidentifier:).md)
- [getFileSystemInfo(forPath:isRemovable:isWritable:isUnmountable:description:type:)](appkit/nsworkspace/getfilesysteminfo(forpath:isremovable:iswritable:isunmountable:description:type:).md)
- [isFilePackage(atPath:)](appkit/nsworkspace/isfilepackage(atpath:).md)
- [frontmostApplication](appkit/nsworkspace/frontmostapplication.md)
- [runningApplications](appkit/nsworkspace/runningapplications.md)
- [menuBarOwningApplication](appkit/nsworkspace/menubarowningapplication.md)
