How to find file UTI for file, withouth pathExtension, in a path in Swift

You can use URL method resourceValues(forKeys:) to get the file URL TypeIdentifierKey which returns the file uniform type identifier (UTI). You just need to check if the returned value is “com.apple.m4v-video” for videos, “public.jpeg” or “public.png” for images and so on. You can add a typeIdentifier property extension to URL to return the TypeIdentifierKey string … Read more