type(ofFile:)
Returns the uniform type identifier of the specified file, if it can be determined.
Declaration
func type(ofFile absoluteFilePath: String) throws -> StringParameters
- absoluteFilePath:
The absolute path of the file.
Return Value
An NSString containing the uniform type identifier of the file at absoluteFilePath. If no UTI can be determined the return value is nil.
Discussion
If the file at the specified path is a symbolic link, the type of the symbolic link is returned.
You can safely call this method from any thread of your app.